mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-037237f8314ad3a0/out/
uavionix.rs

1#![doc = "MAVLink uAvionix dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::{bitflags, Flags};
9use mavlink_core::{
10    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
11};
12#[allow(unused_imports)]
13use num_derive::FromPrimitive;
14#[allow(unused_imports)]
15use num_derive::ToPrimitive;
16#[allow(unused_imports)]
17use num_traits::FromPrimitive;
18#[allow(unused_imports)]
19use num_traits::ToPrimitive;
20#[cfg(feature = "serde")]
21use serde::{Deserialize, Serialize};
22#[cfg(feature = "ts")]
23use ts_rs::TS;
24pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
25#[cfg_attr(feature = "ts", derive(TS))]
26#[cfg_attr(feature = "ts", ts(export))]
27#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
28#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29#[cfg_attr(feature = "serde", serde(tag = "type"))]
30#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31#[repr(u32)]
32#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
33pub enum ActuatorConfiguration {
34    #[doc = "Do nothing."]
35    ACTUATOR_CONFIGURATION_NONE = 0,
36    #[doc = "Command the actuator to beep now."]
37    ACTUATOR_CONFIGURATION_BEEP = 1,
38    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
40    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
41    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
44    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
45    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
46}
47impl ActuatorConfiguration {
48    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
49}
50impl Default for ActuatorConfiguration {
51    fn default() -> Self {
52        Self::DEFAULT
53    }
54}
55#[cfg_attr(feature = "ts", derive(TS))]
56#[cfg_attr(feature = "ts", ts(export))]
57#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
58#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
59#[cfg_attr(feature = "serde", serde(tag = "type"))]
60#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
61#[repr(u32)]
62#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
63pub enum ActuatorOutputFunction {
64    #[doc = "No function (disabled)."]
65    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
66    #[doc = "Motor 1"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
68    #[doc = "Motor 2"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
70    #[doc = "Motor 3"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
72    #[doc = "Motor 4"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
74    #[doc = "Motor 5"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
76    #[doc = "Motor 6"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
78    #[doc = "Motor 7"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
80    #[doc = "Motor 8"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
82    #[doc = "Motor 9"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
84    #[doc = "Motor 10"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
86    #[doc = "Motor 11"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
88    #[doc = "Motor 12"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
90    #[doc = "Motor 13"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
92    #[doc = "Motor 14"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
94    #[doc = "Motor 15"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
96    #[doc = "Motor 16"]
97    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
98    #[doc = "Servo 1"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
100    #[doc = "Servo 2"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
102    #[doc = "Servo 3"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
104    #[doc = "Servo 4"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
106    #[doc = "Servo 5"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
108    #[doc = "Servo 6"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
110    #[doc = "Servo 7"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
112    #[doc = "Servo 8"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
114    #[doc = "Servo 9"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
116    #[doc = "Servo 10"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
118    #[doc = "Servo 11"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
120    #[doc = "Servo 12"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
122    #[doc = "Servo 13"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
124    #[doc = "Servo 14"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
126    #[doc = "Servo 15"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
128    #[doc = "Servo 16"]
129    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
130}
131impl ActuatorOutputFunction {
132    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
133}
134impl Default for ActuatorOutputFunction {
135    fn default() -> Self {
136        Self::DEFAULT
137    }
138}
139#[cfg_attr(feature = "ts", derive(TS))]
140#[cfg_attr(feature = "ts", ts(export))]
141#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
143#[cfg_attr(feature = "serde", serde(tag = "type"))]
144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
145#[repr(u32)]
146#[doc = "Enumeration of the ADSB altimeter types"]
147pub enum AdsbAltitudeType {
148    #[doc = "Altitude reported from a Baro source using QNH reference"]
149    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
150    #[doc = "Altitude reported from a GNSS source"]
151    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
152}
153impl AdsbAltitudeType {
154    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
155}
156impl Default for AdsbAltitudeType {
157    fn default() -> Self {
158        Self::DEFAULT
159    }
160}
161#[cfg_attr(feature = "ts", derive(TS))]
162#[cfg_attr(feature = "ts", ts(export))]
163#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
165#[cfg_attr(feature = "serde", serde(tag = "type"))]
166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
167#[repr(u32)]
168#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
169pub enum AdsbEmitterType {
170    ADSB_EMITTER_TYPE_NO_INFO = 0,
171    ADSB_EMITTER_TYPE_LIGHT = 1,
172    ADSB_EMITTER_TYPE_SMALL = 2,
173    ADSB_EMITTER_TYPE_LARGE = 3,
174    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
175    ADSB_EMITTER_TYPE_HEAVY = 5,
176    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
177    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
178    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
179    ADSB_EMITTER_TYPE_GLIDER = 9,
180    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
181    ADSB_EMITTER_TYPE_PARACHUTE = 11,
182    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
183    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
184    ADSB_EMITTER_TYPE_UAV = 14,
185    ADSB_EMITTER_TYPE_SPACE = 15,
186    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
187    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
188    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
189    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
190}
191impl AdsbEmitterType {
192    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
193}
194impl Default for AdsbEmitterType {
195    fn default() -> Self {
196        Self::DEFAULT
197    }
198}
199bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
200impl AdsbFlags {
201    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
202}
203impl Default for AdsbFlags {
204    fn default() -> Self {
205        Self::DEFAULT
206    }
207}
208bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
209impl AisFlags {
210    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
211}
212impl Default for AisFlags {
213    fn default() -> Self {
214        Self::DEFAULT
215    }
216}
217#[cfg_attr(feature = "ts", derive(TS))]
218#[cfg_attr(feature = "ts", ts(export))]
219#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
221#[cfg_attr(feature = "serde", serde(tag = "type"))]
222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
223#[repr(u32)]
224#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
225pub enum AisNavStatus {
226    #[doc = "Under way using engine."]
227    UNDER_WAY = 0,
228    AIS_NAV_ANCHORED = 1,
229    AIS_NAV_UN_COMMANDED = 2,
230    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
231    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
232    AIS_NAV_MOORED = 5,
233    AIS_NAV_AGROUND = 6,
234    AIS_NAV_FISHING = 7,
235    AIS_NAV_SAILING = 8,
236    AIS_NAV_RESERVED_HSC = 9,
237    AIS_NAV_RESERVED_WIG = 10,
238    AIS_NAV_RESERVED_1 = 11,
239    AIS_NAV_RESERVED_2 = 12,
240    AIS_NAV_RESERVED_3 = 13,
241    #[doc = "Search And Rescue Transponder."]
242    AIS_NAV_AIS_SART = 14,
243    #[doc = "Not available (default)."]
244    AIS_NAV_UNKNOWN = 15,
245}
246impl AisNavStatus {
247    pub const DEFAULT: Self = Self::UNDER_WAY;
248}
249impl Default for AisNavStatus {
250    fn default() -> Self {
251        Self::DEFAULT
252    }
253}
254#[cfg_attr(feature = "ts", derive(TS))]
255#[cfg_attr(feature = "ts", ts(export))]
256#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
258#[cfg_attr(feature = "serde", serde(tag = "type"))]
259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
260#[repr(u32)]
261#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
262pub enum AisType {
263    #[doc = "Not available (default)."]
264    AIS_TYPE_UNKNOWN = 0,
265    AIS_TYPE_RESERVED_1 = 1,
266    AIS_TYPE_RESERVED_2 = 2,
267    AIS_TYPE_RESERVED_3 = 3,
268    AIS_TYPE_RESERVED_4 = 4,
269    AIS_TYPE_RESERVED_5 = 5,
270    AIS_TYPE_RESERVED_6 = 6,
271    AIS_TYPE_RESERVED_7 = 7,
272    AIS_TYPE_RESERVED_8 = 8,
273    AIS_TYPE_RESERVED_9 = 9,
274    AIS_TYPE_RESERVED_10 = 10,
275    AIS_TYPE_RESERVED_11 = 11,
276    AIS_TYPE_RESERVED_12 = 12,
277    AIS_TYPE_RESERVED_13 = 13,
278    AIS_TYPE_RESERVED_14 = 14,
279    AIS_TYPE_RESERVED_15 = 15,
280    AIS_TYPE_RESERVED_16 = 16,
281    AIS_TYPE_RESERVED_17 = 17,
282    AIS_TYPE_RESERVED_18 = 18,
283    AIS_TYPE_RESERVED_19 = 19,
284    #[doc = "Wing In Ground effect."]
285    AIS_TYPE_WIG = 20,
286    AIS_TYPE_WIG_HAZARDOUS_A = 21,
287    AIS_TYPE_WIG_HAZARDOUS_B = 22,
288    AIS_TYPE_WIG_HAZARDOUS_C = 23,
289    AIS_TYPE_WIG_HAZARDOUS_D = 24,
290    AIS_TYPE_WIG_RESERVED_1 = 25,
291    AIS_TYPE_WIG_RESERVED_2 = 26,
292    AIS_TYPE_WIG_RESERVED_3 = 27,
293    AIS_TYPE_WIG_RESERVED_4 = 28,
294    AIS_TYPE_WIG_RESERVED_5 = 29,
295    AIS_TYPE_FISHING = 30,
296    AIS_TYPE_TOWING = 31,
297    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
298    AIS_TYPE_TOWING_LARGE = 32,
299    #[doc = "Dredging or other underwater ops."]
300    AIS_TYPE_DREDGING = 33,
301    AIS_TYPE_DIVING = 34,
302    AIS_TYPE_MILITARY = 35,
303    AIS_TYPE_SAILING = 36,
304    AIS_TYPE_PLEASURE = 37,
305    AIS_TYPE_RESERVED_20 = 38,
306    AIS_TYPE_RESERVED_21 = 39,
307    #[doc = "High Speed Craft."]
308    AIS_TYPE_HSC = 40,
309    AIS_TYPE_HSC_HAZARDOUS_A = 41,
310    AIS_TYPE_HSC_HAZARDOUS_B = 42,
311    AIS_TYPE_HSC_HAZARDOUS_C = 43,
312    AIS_TYPE_HSC_HAZARDOUS_D = 44,
313    AIS_TYPE_HSC_RESERVED_1 = 45,
314    AIS_TYPE_HSC_RESERVED_2 = 46,
315    AIS_TYPE_HSC_RESERVED_3 = 47,
316    AIS_TYPE_HSC_RESERVED_4 = 48,
317    AIS_TYPE_HSC_UNKNOWN = 49,
318    AIS_TYPE_PILOT = 50,
319    #[doc = "Search And Rescue vessel."]
320    AIS_TYPE_SAR = 51,
321    AIS_TYPE_TUG = 52,
322    AIS_TYPE_PORT_TENDER = 53,
323    #[doc = "Anti-pollution equipment."]
324    AIS_TYPE_ANTI_POLLUTION = 54,
325    AIS_TYPE_LAW_ENFORCEMENT = 55,
326    AIS_TYPE_SPARE_LOCAL_1 = 56,
327    AIS_TYPE_SPARE_LOCAL_2 = 57,
328    AIS_TYPE_MEDICAL_TRANSPORT = 58,
329    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
330    AIS_TYPE_NONECOMBATANT = 59,
331    AIS_TYPE_PASSENGER = 60,
332    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
333    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
334    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
335    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
336    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
337    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
338    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
339    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
340    AIS_TYPE_PASSENGER_UNKNOWN = 69,
341    AIS_TYPE_CARGO = 70,
342    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
343    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
344    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
345    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
346    AIS_TYPE_CARGO_RESERVED_1 = 75,
347    AIS_TYPE_CARGO_RESERVED_2 = 76,
348    AIS_TYPE_CARGO_RESERVED_3 = 77,
349    AIS_TYPE_CARGO_RESERVED_4 = 78,
350    AIS_TYPE_CARGO_UNKNOWN = 79,
351    AIS_TYPE_TANKER = 80,
352    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
353    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
354    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
355    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
356    AIS_TYPE_TANKER_RESERVED_1 = 85,
357    AIS_TYPE_TANKER_RESERVED_2 = 86,
358    AIS_TYPE_TANKER_RESERVED_3 = 87,
359    AIS_TYPE_TANKER_RESERVED_4 = 88,
360    AIS_TYPE_TANKER_UNKNOWN = 89,
361    AIS_TYPE_OTHER = 90,
362    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
363    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
364    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
365    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
366    AIS_TYPE_OTHER_RESERVED_1 = 95,
367    AIS_TYPE_OTHER_RESERVED_2 = 96,
368    AIS_TYPE_OTHER_RESERVED_3 = 97,
369    AIS_TYPE_OTHER_RESERVED_4 = 98,
370    AIS_TYPE_OTHER_UNKNOWN = 99,
371}
372impl AisType {
373    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
374}
375impl Default for AisType {
376    fn default() -> Self {
377        Self::DEFAULT
378    }
379}
380bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
381impl AttitudeTargetTypemask {
382    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
383}
384impl Default for AttitudeTargetTypemask {
385    fn default() -> Self {
386        Self::DEFAULT
387    }
388}
389#[cfg_attr(feature = "ts", derive(TS))]
390#[cfg_attr(feature = "ts", ts(export))]
391#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
393#[cfg_attr(feature = "serde", serde(tag = "type"))]
394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
395#[repr(u32)]
396#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
397pub enum AutotuneAxis {
398    #[doc = "Autotune roll axis."]
399    AUTOTUNE_AXIS_ROLL = 1,
400    #[doc = "Autotune pitch axis."]
401    AUTOTUNE_AXIS_PITCH = 2,
402    #[doc = "Autotune yaw axis."]
403    AUTOTUNE_AXIS_YAW = 4,
404}
405impl AutotuneAxis {
406    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
407}
408impl Default for AutotuneAxis {
409    fn default() -> Self {
410        Self::DEFAULT
411    }
412}
413bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
414impl CameraCapFlags {
415    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
416}
417impl Default for CameraCapFlags {
418    fn default() -> Self {
419        Self::DEFAULT
420    }
421}
422#[cfg_attr(feature = "ts", derive(TS))]
423#[cfg_attr(feature = "ts", ts(export))]
424#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
425#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
426#[cfg_attr(feature = "serde", serde(tag = "type"))]
427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
428#[repr(u32)]
429#[doc = "Camera Modes."]
430pub enum CameraMode {
431    #[doc = "Camera is in image/photo capture mode."]
432    CAMERA_MODE_IMAGE = 0,
433    #[doc = "Camera is in video capture mode."]
434    CAMERA_MODE_VIDEO = 1,
435    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
436    CAMERA_MODE_IMAGE_SURVEY = 2,
437}
438impl CameraMode {
439    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
440}
441impl Default for CameraMode {
442    fn default() -> Self {
443        Self::DEFAULT
444    }
445}
446#[cfg_attr(feature = "ts", derive(TS))]
447#[cfg_attr(feature = "ts", ts(export))]
448#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
450#[cfg_attr(feature = "serde", serde(tag = "type"))]
451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
452#[repr(u32)]
453#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
454pub enum CameraSource {
455    #[doc = "Default camera source."]
456    CAMERA_SOURCE_DEFAULT = 0,
457    #[doc = "RGB camera source."]
458    CAMERA_SOURCE_RGB = 1,
459    #[doc = "IR camera source."]
460    CAMERA_SOURCE_IR = 2,
461    #[doc = "NDVI camera source."]
462    CAMERA_SOURCE_NDVI = 3,
463}
464impl CameraSource {
465    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
466}
467impl Default for CameraSource {
468    fn default() -> Self {
469        Self::DEFAULT
470    }
471}
472#[cfg_attr(feature = "ts", derive(TS))]
473#[cfg_attr(feature = "ts", ts(export))]
474#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
476#[cfg_attr(feature = "serde", serde(tag = "type"))]
477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
478#[repr(u32)]
479#[doc = "Camera tracking modes"]
480pub enum CameraTrackingMode {
481    #[doc = "Not tracking"]
482    CAMERA_TRACKING_MODE_NONE = 0,
483    #[doc = "Target is a point"]
484    CAMERA_TRACKING_MODE_POINT = 1,
485    #[doc = "Target is a rectangle"]
486    CAMERA_TRACKING_MODE_RECTANGLE = 2,
487}
488impl CameraTrackingMode {
489    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
490}
491impl Default for CameraTrackingMode {
492    fn default() -> Self {
493        Self::DEFAULT
494    }
495}
496#[cfg_attr(feature = "ts", derive(TS))]
497#[cfg_attr(feature = "ts", ts(export))]
498#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
500#[cfg_attr(feature = "serde", serde(tag = "type"))]
501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
502#[repr(u32)]
503#[doc = "Camera tracking status flags"]
504pub enum CameraTrackingStatusFlags {
505    #[doc = "Camera is not tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
507    #[doc = "Camera is tracking"]
508    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
509    #[doc = "Camera tracking in error state"]
510    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
511}
512impl CameraTrackingStatusFlags {
513    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
514}
515impl Default for CameraTrackingStatusFlags {
516    fn default() -> Self {
517        Self::DEFAULT
518    }
519}
520bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
521impl CameraTrackingTargetData {
522    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
523}
524impl Default for CameraTrackingTargetData {
525    fn default() -> Self {
526        Self::DEFAULT
527    }
528}
529#[cfg_attr(feature = "ts", derive(TS))]
530#[cfg_attr(feature = "ts", ts(export))]
531#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
533#[cfg_attr(feature = "serde", serde(tag = "type"))]
534#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
535#[repr(u32)]
536#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
537pub enum CameraZoomType {
538    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
539    ZOOM_TYPE_STEP = 0,
540    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
541    ZOOM_TYPE_CONTINUOUS = 1,
542    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
543    ZOOM_TYPE_RANGE = 2,
544    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
545    ZOOM_TYPE_FOCAL_LENGTH = 3,
546    #[doc = "Zoom value as horizontal field of view in degrees."]
547    ZOOM_TYPE_HORIZONTAL_FOV = 4,
548}
549impl CameraZoomType {
550    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
551}
552impl Default for CameraZoomType {
553    fn default() -> Self {
554        Self::DEFAULT
555    }
556}
557#[cfg_attr(feature = "ts", derive(TS))]
558#[cfg_attr(feature = "ts", ts(export))]
559#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
561#[cfg_attr(feature = "serde", serde(tag = "type"))]
562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
563#[repr(u32)]
564pub enum CanFilterOp {
565    CAN_FILTER_REPLACE = 0,
566    CAN_FILTER_ADD = 1,
567    CAN_FILTER_REMOVE = 2,
568}
569impl CanFilterOp {
570    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
571}
572impl Default for CanFilterOp {
573    fn default() -> Self {
574        Self::DEFAULT
575    }
576}
577#[cfg_attr(feature = "ts", derive(TS))]
578#[cfg_attr(feature = "ts", ts(export))]
579#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
581#[cfg_attr(feature = "serde", serde(tag = "type"))]
582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
583#[repr(u32)]
584#[doc = "Possible responses from a CELLULAR_CONFIG message."]
585pub enum CellularConfigResponse {
586    #[doc = "Changes accepted."]
587    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
588    #[doc = "Invalid APN."]
589    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
590    #[doc = "Invalid PIN."]
591    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
592    #[doc = "Changes rejected."]
593    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
594    #[doc = "PUK is required to unblock SIM card."]
595    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
596}
597impl CellularConfigResponse {
598    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
599}
600impl Default for CellularConfigResponse {
601    fn default() -> Self {
602        Self::DEFAULT
603    }
604}
605#[cfg_attr(feature = "ts", derive(TS))]
606#[cfg_attr(feature = "ts", ts(export))]
607#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
609#[cfg_attr(feature = "serde", serde(tag = "type"))]
610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
611#[repr(u32)]
612#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
613pub enum CellularNetworkFailedReason {
614    #[doc = "No error"]
615    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
616    #[doc = "Error state is unknown"]
617    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
618    #[doc = "SIM is required for the modem but missing"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
620    #[doc = "SIM is available, but not usable for connection"]
621    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
622}
623impl CellularNetworkFailedReason {
624    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
625}
626impl Default for CellularNetworkFailedReason {
627    fn default() -> Self {
628        Self::DEFAULT
629    }
630}
631#[cfg_attr(feature = "ts", derive(TS))]
632#[cfg_attr(feature = "ts", ts(export))]
633#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
635#[cfg_attr(feature = "serde", serde(tag = "type"))]
636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
637#[repr(u32)]
638#[doc = "Cellular network radio type"]
639pub enum CellularNetworkRadioType {
640    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
641    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
642    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
643    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
644    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
645}
646impl CellularNetworkRadioType {
647    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
648}
649impl Default for CellularNetworkRadioType {
650    fn default() -> Self {
651        Self::DEFAULT
652    }
653}
654#[cfg_attr(feature = "ts", derive(TS))]
655#[cfg_attr(feature = "ts", ts(export))]
656#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
658#[cfg_attr(feature = "serde", serde(tag = "type"))]
659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
660#[repr(u32)]
661#[doc = "These flags encode the cellular network status"]
662pub enum CellularStatusFlag {
663    #[doc = "State unknown or not reportable."]
664    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
665    #[doc = "Modem is unusable"]
666    CELLULAR_STATUS_FLAG_FAILED = 1,
667    #[doc = "Modem is being initialized"]
668    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
669    #[doc = "Modem is locked"]
670    CELLULAR_STATUS_FLAG_LOCKED = 3,
671    #[doc = "Modem is not enabled and is powered down"]
672    CELLULAR_STATUS_FLAG_DISABLED = 4,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
674    CELLULAR_STATUS_FLAG_DISABLING = 5,
675    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
676    CELLULAR_STATUS_FLAG_ENABLING = 6,
677    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
678    CELLULAR_STATUS_FLAG_ENABLED = 7,
679    #[doc = "Modem is searching for a network provider to register"]
680    CELLULAR_STATUS_FLAG_SEARCHING = 8,
681    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
682    CELLULAR_STATUS_FLAG_REGISTERED = 9,
683    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
684    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
685    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
686    CELLULAR_STATUS_FLAG_CONNECTING = 11,
687    #[doc = "One or more packet data bearers is active and connected"]
688    CELLULAR_STATUS_FLAG_CONNECTED = 12,
689}
690impl CellularStatusFlag {
691    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
692}
693impl Default for CellularStatusFlag {
694    fn default() -> Self {
695        Self::DEFAULT
696    }
697}
698#[cfg_attr(feature = "ts", derive(TS))]
699#[cfg_attr(feature = "ts", ts(export))]
700#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
702#[cfg_attr(feature = "serde", serde(tag = "type"))]
703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
704#[repr(u32)]
705#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
706pub enum CompMetadataType {
707    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
708    COMP_METADATA_TYPE_GENERAL = 0,
709    #[doc = "Parameter meta data."]
710    COMP_METADATA_TYPE_PARAMETER = 1,
711    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
712    COMP_METADATA_TYPE_COMMANDS = 2,
713    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
714    COMP_METADATA_TYPE_PERIPHERALS = 3,
715    #[doc = "Meta data for the events interface."]
716    COMP_METADATA_TYPE_EVENTS = 4,
717    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
718    COMP_METADATA_TYPE_ACTUATORS = 5,
719}
720impl CompMetadataType {
721    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
722}
723impl Default for CompMetadataType {
724    fn default() -> Self {
725        Self::DEFAULT
726    }
727}
728#[cfg_attr(feature = "ts", derive(TS))]
729#[cfg_attr(feature = "ts", ts(export))]
730#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
732#[cfg_attr(feature = "serde", serde(tag = "type"))]
733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
734#[repr(u32)]
735#[doc = "Indicates the ESC connection type."]
736pub enum EscConnectionType {
737    #[doc = "Traditional PPM ESC."]
738    ESC_CONNECTION_TYPE_PPM = 0,
739    #[doc = "Serial Bus connected ESC."]
740    ESC_CONNECTION_TYPE_SERIAL = 1,
741    #[doc = "One Shot PPM ESC."]
742    ESC_CONNECTION_TYPE_ONESHOT = 2,
743    #[doc = "I2C ESC."]
744    ESC_CONNECTION_TYPE_I2C = 3,
745    #[doc = "CAN-Bus ESC."]
746    ESC_CONNECTION_TYPE_CAN = 4,
747    #[doc = "DShot ESC."]
748    ESC_CONNECTION_TYPE_DSHOT = 5,
749}
750impl EscConnectionType {
751    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
752}
753impl Default for EscConnectionType {
754    fn default() -> Self {
755        Self::DEFAULT
756    }
757}
758bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
759impl EscFailureFlags {
760    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
761}
762impl Default for EscFailureFlags {
763    fn default() -> Self {
764        Self::DEFAULT
765    }
766}
767bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
768impl EstimatorStatusFlags {
769    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
770}
771impl Default for EstimatorStatusFlags {
772    fn default() -> Self {
773        Self::DEFAULT
774    }
775}
776#[cfg_attr(feature = "ts", derive(TS))]
777#[cfg_attr(feature = "ts", ts(export))]
778#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
780#[cfg_attr(feature = "serde", serde(tag = "type"))]
781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
782#[repr(u32)]
783#[doc = "List of possible failure type to inject."]
784pub enum FailureType {
785    #[doc = "No failure injected, used to reset a previous failure."]
786    FAILURE_TYPE_OK = 0,
787    #[doc = "Sets unit off, so completely non-responsive."]
788    FAILURE_TYPE_OFF = 1,
789    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
790    FAILURE_TYPE_STUCK = 2,
791    #[doc = "Unit is reporting complete garbage."]
792    FAILURE_TYPE_GARBAGE = 3,
793    #[doc = "Unit is consistently wrong."]
794    FAILURE_TYPE_WRONG = 4,
795    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
796    FAILURE_TYPE_SLOW = 5,
797    #[doc = "Data of unit is delayed in time."]
798    FAILURE_TYPE_DELAYED = 6,
799    #[doc = "Unit is sometimes working, sometimes not."]
800    FAILURE_TYPE_INTERMITTENT = 7,
801}
802impl FailureType {
803    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
804}
805impl Default for FailureType {
806    fn default() -> Self {
807        Self::DEFAULT
808    }
809}
810#[cfg_attr(feature = "ts", derive(TS))]
811#[cfg_attr(feature = "ts", ts(export))]
812#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
814#[cfg_attr(feature = "serde", serde(tag = "type"))]
815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
816#[repr(u32)]
817#[doc = "List of possible units where failures can be injected."]
818pub enum FailureUnit {
819    FAILURE_UNIT_SENSOR_GYRO = 0,
820    FAILURE_UNIT_SENSOR_ACCEL = 1,
821    FAILURE_UNIT_SENSOR_MAG = 2,
822    FAILURE_UNIT_SENSOR_BARO = 3,
823    FAILURE_UNIT_SENSOR_GPS = 4,
824    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
825    FAILURE_UNIT_SENSOR_VIO = 6,
826    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
827    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
828    FAILURE_UNIT_SYSTEM_BATTERY = 100,
829    FAILURE_UNIT_SYSTEM_MOTOR = 101,
830    FAILURE_UNIT_SYSTEM_SERVO = 102,
831    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
832    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
833    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
834}
835impl FailureUnit {
836    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
837}
838impl Default for FailureUnit {
839    fn default() -> Self {
840        Self::DEFAULT
841    }
842}
843#[cfg_attr(feature = "ts", derive(TS))]
844#[cfg_attr(feature = "ts", ts(export))]
845#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
847#[cfg_attr(feature = "serde", serde(tag = "type"))]
848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
849#[repr(u32)]
850pub enum FenceBreach {
851    #[doc = "No last fence breach"]
852    FENCE_BREACH_NONE = 0,
853    #[doc = "Breached minimum altitude"]
854    FENCE_BREACH_MINALT = 1,
855    #[doc = "Breached maximum altitude"]
856    FENCE_BREACH_MAXALT = 2,
857    #[doc = "Breached fence boundary"]
858    FENCE_BREACH_BOUNDARY = 3,
859}
860impl FenceBreach {
861    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
862}
863impl Default for FenceBreach {
864    fn default() -> Self {
865        Self::DEFAULT
866    }
867}
868#[cfg_attr(feature = "ts", derive(TS))]
869#[cfg_attr(feature = "ts", ts(export))]
870#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
872#[cfg_attr(feature = "serde", serde(tag = "type"))]
873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
874#[repr(u32)]
875#[doc = "Actions being taken to mitigate/prevent fence breach"]
876pub enum FenceMitigate {
877    #[doc = "Unknown"]
878    FENCE_MITIGATE_UNKNOWN = 0,
879    #[doc = "No actions being taken"]
880    FENCE_MITIGATE_NONE = 1,
881    #[doc = "Velocity limiting active to prevent breach"]
882    FENCE_MITIGATE_VEL_LIMIT = 2,
883}
884impl FenceMitigate {
885    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
886}
887impl Default for FenceMitigate {
888    fn default() -> Self {
889        Self::DEFAULT
890    }
891}
892#[cfg_attr(feature = "ts", derive(TS))]
893#[cfg_attr(feature = "ts", ts(export))]
894#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
895#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
896#[cfg_attr(feature = "serde", serde(tag = "type"))]
897#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
898#[repr(u32)]
899#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
900pub enum FenceType {
901    #[doc = "Maximum altitude fence"]
902    FENCE_TYPE_ALT_MAX = 1,
903    #[doc = "Circle fence"]
904    FENCE_TYPE_CIRCLE = 2,
905    #[doc = "Polygon fence"]
906    FENCE_TYPE_POLYGON = 4,
907    #[doc = "Minimum altitude fence"]
908    FENCE_TYPE_ALT_MIN = 8,
909}
910impl FenceType {
911    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
912}
913impl Default for FenceType {
914    fn default() -> Self {
915        Self::DEFAULT
916    }
917}
918#[cfg_attr(feature = "ts", derive(TS))]
919#[cfg_attr(feature = "ts", ts(export))]
920#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
922#[cfg_attr(feature = "serde", serde(tag = "type"))]
923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
924#[repr(u32)]
925#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
926pub enum FirmwareVersionType {
927    #[doc = "development release"]
928    FIRMWARE_VERSION_TYPE_DEV = 0,
929    #[doc = "alpha release"]
930    FIRMWARE_VERSION_TYPE_ALPHA = 64,
931    #[doc = "beta release"]
932    FIRMWARE_VERSION_TYPE_BETA = 128,
933    #[doc = "release candidate"]
934    FIRMWARE_VERSION_TYPE_RC = 192,
935    #[doc = "official stable release"]
936    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
937}
938impl FirmwareVersionType {
939    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
940}
941impl Default for FirmwareVersionType {
942    fn default() -> Self {
943        Self::DEFAULT
944    }
945}
946bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
947impl GimbalDeviceCapFlags {
948    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
949}
950impl Default for GimbalDeviceCapFlags {
951    fn default() -> Self {
952        Self::DEFAULT
953    }
954}
955bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
956impl GimbalDeviceErrorFlags {
957    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
958}
959impl Default for GimbalDeviceErrorFlags {
960    fn default() -> Self {
961        Self::DEFAULT
962    }
963}
964bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
965impl GimbalDeviceFlags {
966    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
967}
968impl Default for GimbalDeviceFlags {
969    fn default() -> Self {
970        Self::DEFAULT
971    }
972}
973bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
974impl GimbalManagerCapFlags {
975    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
976}
977impl Default for GimbalManagerCapFlags {
978    fn default() -> Self {
979        Self::DEFAULT
980    }
981}
982bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
983impl GimbalManagerFlags {
984    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
985}
986impl Default for GimbalManagerFlags {
987    fn default() -> Self {
988        Self::DEFAULT
989    }
990}
991#[cfg_attr(feature = "ts", derive(TS))]
992#[cfg_attr(feature = "ts", ts(export))]
993#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
995#[cfg_attr(feature = "serde", serde(tag = "type"))]
996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
997#[repr(u32)]
998#[doc = "Type of GPS fix"]
999pub enum GpsFixType {
1000    #[doc = "No GPS connected"]
1001    GPS_FIX_TYPE_NO_GPS = 0,
1002    #[doc = "No position information, GPS is connected"]
1003    GPS_FIX_TYPE_NO_FIX = 1,
1004    #[doc = "2D position"]
1005    GPS_FIX_TYPE_2D_FIX = 2,
1006    #[doc = "3D position"]
1007    GPS_FIX_TYPE_3D_FIX = 3,
1008    #[doc = "DGPS/SBAS aided 3D position"]
1009    GPS_FIX_TYPE_DGPS = 4,
1010    #[doc = "RTK float, 3D position"]
1011    GPS_FIX_TYPE_RTK_FLOAT = 5,
1012    #[doc = "RTK Fixed, 3D position"]
1013    GPS_FIX_TYPE_RTK_FIXED = 6,
1014    #[doc = "Static fixed, typically used for base stations"]
1015    GPS_FIX_TYPE_STATIC = 7,
1016    #[doc = "PPP, 3D position."]
1017    GPS_FIX_TYPE_PPP = 8,
1018}
1019impl GpsFixType {
1020    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1021}
1022impl Default for GpsFixType {
1023    fn default() -> Self {
1024        Self::DEFAULT
1025    }
1026}
1027bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1028impl GpsInputIgnoreFlags {
1029    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1030}
1031impl Default for GpsInputIgnoreFlags {
1032    fn default() -> Self {
1033        Self::DEFAULT
1034    }
1035}
1036#[cfg_attr(feature = "ts", derive(TS))]
1037#[cfg_attr(feature = "ts", ts(export))]
1038#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1039#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1040#[cfg_attr(feature = "serde", serde(tag = "type"))]
1041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1042#[repr(u32)]
1043#[doc = "Gripper actions."]
1044pub enum GripperActions {
1045    #[doc = "Gripper release cargo."]
1046    GRIPPER_ACTION_RELEASE = 0,
1047    #[doc = "Gripper grab onto cargo."]
1048    GRIPPER_ACTION_GRAB = 1,
1049}
1050impl GripperActions {
1051    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1052}
1053impl Default for GripperActions {
1054    fn default() -> Self {
1055        Self::DEFAULT
1056    }
1057}
1058bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1059impl HighresImuUpdatedFlags {
1060    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1061}
1062impl Default for HighresImuUpdatedFlags {
1063    fn default() -> Self {
1064        Self::DEFAULT
1065    }
1066}
1067bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1068impl HilActuatorControlsFlags {
1069    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1070}
1071impl Default for HilActuatorControlsFlags {
1072    fn default() -> Self {
1073        Self::DEFAULT
1074    }
1075}
1076bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1077impl HilSensorUpdatedFlags {
1078    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1079}
1080impl Default for HilSensorUpdatedFlags {
1081    fn default() -> Self {
1082        Self::DEFAULT
1083    }
1084}
1085bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1086impl HlFailureFlag {
1087    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1088}
1089impl Default for HlFailureFlag {
1090    fn default() -> Self {
1091        Self::DEFAULT
1092    }
1093}
1094bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1095impl IlluminatorErrorFlags {
1096    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1097}
1098impl Default for IlluminatorErrorFlags {
1099    fn default() -> Self {
1100        Self::DEFAULT
1101    }
1102}
1103#[cfg_attr(feature = "ts", derive(TS))]
1104#[cfg_attr(feature = "ts", ts(export))]
1105#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1106#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1107#[cfg_attr(feature = "serde", serde(tag = "type"))]
1108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1109#[repr(u32)]
1110#[doc = "Modes of illuminator"]
1111pub enum IlluminatorMode {
1112    #[doc = "Illuminator mode is not specified/unknown"]
1113    ILLUMINATOR_MODE_UNKNOWN = 0,
1114    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1115    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1116    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1117    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1118}
1119impl IlluminatorMode {
1120    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1121}
1122impl Default for IlluminatorMode {
1123    fn default() -> Self {
1124        Self::DEFAULT
1125    }
1126}
1127#[cfg_attr(feature = "ts", derive(TS))]
1128#[cfg_attr(feature = "ts", ts(export))]
1129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1131#[cfg_attr(feature = "serde", serde(tag = "type"))]
1132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1133#[repr(u32)]
1134#[doc = "Type of landing target"]
1135pub enum LandingTargetType {
1136    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1137    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1138    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1139    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1140    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1141    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1142    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1143    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1144}
1145impl LandingTargetType {
1146    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1147}
1148impl Default for LandingTargetType {
1149    fn default() -> Self {
1150        Self::DEFAULT
1151    }
1152}
1153#[cfg_attr(feature = "ts", derive(TS))]
1154#[cfg_attr(feature = "ts", ts(export))]
1155#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1157#[cfg_attr(feature = "serde", serde(tag = "type"))]
1158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1159#[repr(u32)]
1160pub enum MagCalStatus {
1161    MAG_CAL_NOT_STARTED = 0,
1162    MAG_CAL_WAITING_TO_START = 1,
1163    MAG_CAL_RUNNING_STEP_ONE = 2,
1164    MAG_CAL_RUNNING_STEP_TWO = 3,
1165    MAG_CAL_SUCCESS = 4,
1166    MAG_CAL_FAILED = 5,
1167    MAG_CAL_BAD_ORIENTATION = 6,
1168    MAG_CAL_BAD_RADIUS = 7,
1169}
1170impl MagCalStatus {
1171    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1172}
1173impl Default for MagCalStatus {
1174    fn default() -> Self {
1175        Self::DEFAULT
1176    }
1177}
1178#[cfg_attr(feature = "ts", derive(TS))]
1179#[cfg_attr(feature = "ts", ts(export))]
1180#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1182#[cfg_attr(feature = "serde", serde(tag = "type"))]
1183#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1184#[repr(u32)]
1185pub enum MavArmAuthDeniedReason {
1186    #[doc = "Not a specific reason"]
1187    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1188    #[doc = "Authorizer will send the error as string to GCS"]
1189    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1190    #[doc = "At least one waypoint have a invalid value"]
1191    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1192    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1193    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1194    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1195    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1196    #[doc = "Weather is not good to fly"]
1197    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1198}
1199impl MavArmAuthDeniedReason {
1200    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1201}
1202impl Default for MavArmAuthDeniedReason {
1203    fn default() -> Self {
1204        Self::DEFAULT
1205    }
1206}
1207#[cfg_attr(feature = "ts", derive(TS))]
1208#[cfg_attr(feature = "ts", ts(export))]
1209#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1211#[cfg_attr(feature = "serde", serde(tag = "type"))]
1212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1213#[repr(u32)]
1214#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1215pub enum MavAutopilot {
1216    #[doc = "Generic autopilot, full support for everything"]
1217    MAV_AUTOPILOT_GENERIC = 0,
1218    #[doc = "Reserved for future use."]
1219    MAV_AUTOPILOT_RESERVED = 1,
1220    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1221    MAV_AUTOPILOT_SLUGS = 2,
1222    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1223    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1224    #[doc = "OpenPilot, <http://openpilot.org>"]
1225    MAV_AUTOPILOT_OPENPILOT = 4,
1226    #[doc = "Generic autopilot only supporting simple waypoints"]
1227    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1228    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1229    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1230    #[doc = "Generic autopilot supporting the full mission command set"]
1231    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1232    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1233    MAV_AUTOPILOT_INVALID = 8,
1234    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1235    MAV_AUTOPILOT_PPZ = 9,
1236    #[doc = "UAV Dev Board"]
1237    MAV_AUTOPILOT_UDB = 10,
1238    #[doc = "FlexiPilot"]
1239    MAV_AUTOPILOT_FP = 11,
1240    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1241    MAV_AUTOPILOT_PX4 = 12,
1242    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1243    MAV_AUTOPILOT_SMACCMPILOT = 13,
1244    #[doc = "AutoQuad -- <http://autoquad.org>"]
1245    MAV_AUTOPILOT_AUTOQUAD = 14,
1246    #[doc = "Armazila -- <http://armazila.com>"]
1247    MAV_AUTOPILOT_ARMAZILA = 15,
1248    #[doc = "Aerob -- <http://aerob.ru>"]
1249    MAV_AUTOPILOT_AEROB = 16,
1250    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1251    MAV_AUTOPILOT_ASLUAV = 17,
1252    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1253    MAV_AUTOPILOT_SMARTAP = 18,
1254    #[doc = "AirRails - <http://uaventure.com>"]
1255    MAV_AUTOPILOT_AIRRAILS = 19,
1256    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1257    MAV_AUTOPILOT_REFLEX = 20,
1258}
1259impl MavAutopilot {
1260    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1261}
1262impl Default for MavAutopilot {
1263    fn default() -> Self {
1264        Self::DEFAULT
1265    }
1266}
1267#[cfg_attr(feature = "ts", derive(TS))]
1268#[cfg_attr(feature = "ts", ts(export))]
1269#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1271#[cfg_attr(feature = "serde", serde(tag = "type"))]
1272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1273#[repr(u32)]
1274#[doc = "Enumeration for battery charge states."]
1275pub enum MavBatteryChargeState {
1276    #[doc = "Low battery state is not provided"]
1277    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1278    #[doc = "Battery is not in low state. Normal operation."]
1279    MAV_BATTERY_CHARGE_STATE_OK = 1,
1280    #[doc = "Battery state is low, warn and monitor close."]
1281    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1282    #[doc = "Battery state is critical, return or abort immediately."]
1283    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1284    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1285    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1286    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1287    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1288    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1289    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1290    #[doc = "Battery is charging."]
1291    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1292}
1293impl MavBatteryChargeState {
1294    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1295}
1296impl Default for MavBatteryChargeState {
1297    fn default() -> Self {
1298        Self::DEFAULT
1299    }
1300}
1301bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1302impl MavBatteryFault {
1303    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1304}
1305impl Default for MavBatteryFault {
1306    fn default() -> Self {
1307        Self::DEFAULT
1308    }
1309}
1310#[cfg_attr(feature = "ts", derive(TS))]
1311#[cfg_attr(feature = "ts", ts(export))]
1312#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1314#[cfg_attr(feature = "serde", serde(tag = "type"))]
1315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1316#[repr(u32)]
1317#[doc = "Enumeration of battery functions"]
1318pub enum MavBatteryFunction {
1319    #[doc = "Battery function is unknown"]
1320    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1321    #[doc = "Battery supports all flight systems"]
1322    MAV_BATTERY_FUNCTION_ALL = 1,
1323    #[doc = "Battery for the propulsion system"]
1324    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1325    #[doc = "Avionics battery"]
1326    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1327    #[doc = "Payload battery"]
1328    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1329}
1330impl MavBatteryFunction {
1331    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1332}
1333impl Default for MavBatteryFunction {
1334    fn default() -> Self {
1335        Self::DEFAULT
1336    }
1337}
1338#[cfg_attr(feature = "ts", derive(TS))]
1339#[cfg_attr(feature = "ts", ts(export))]
1340#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1342#[cfg_attr(feature = "serde", serde(tag = "type"))]
1343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1344#[repr(u32)]
1345#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1346pub enum MavBatteryMode {
1347    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1348    MAV_BATTERY_MODE_UNKNOWN = 0,
1349    #[doc = "Battery is auto discharging (towards storage level)."]
1350    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1351    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1352    MAV_BATTERY_MODE_HOT_SWAP = 2,
1353}
1354impl MavBatteryMode {
1355    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1356}
1357impl Default for MavBatteryMode {
1358    fn default() -> Self {
1359        Self::DEFAULT
1360    }
1361}
1362#[cfg_attr(feature = "ts", derive(TS))]
1363#[cfg_attr(feature = "ts", ts(export))]
1364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1366#[cfg_attr(feature = "serde", serde(tag = "type"))]
1367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1368#[repr(u32)]
1369#[doc = "Enumeration of battery types"]
1370pub enum MavBatteryType {
1371    #[doc = "Not specified."]
1372    MAV_BATTERY_TYPE_UNKNOWN = 0,
1373    #[doc = "Lithium polymer battery"]
1374    MAV_BATTERY_TYPE_LIPO = 1,
1375    #[doc = "Lithium-iron-phosphate battery"]
1376    MAV_BATTERY_TYPE_LIFE = 2,
1377    #[doc = "Lithium-ION battery"]
1378    MAV_BATTERY_TYPE_LION = 3,
1379    #[doc = "Nickel metal hydride battery"]
1380    MAV_BATTERY_TYPE_NIMH = 4,
1381}
1382impl MavBatteryType {
1383    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1384}
1385impl Default for MavBatteryType {
1386    fn default() -> Self {
1387        Self::DEFAULT
1388    }
1389}
1390#[cfg_attr(feature = "ts", derive(TS))]
1391#[cfg_attr(feature = "ts", ts(export))]
1392#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1394#[cfg_attr(feature = "serde", serde(tag = "type"))]
1395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1396#[repr(u32)]
1397#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1398pub enum MavCmd {
1399    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1400    MAV_CMD_NAV_WAYPOINT = 16,
1401    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1402    MAV_CMD_NAV_LOITER_UNLIM = 17,
1403    #[doc = "Loiter around this waypoint for X turns"]
1404    MAV_CMD_NAV_LOITER_TURNS = 18,
1405    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1406    MAV_CMD_NAV_LOITER_TIME = 19,
1407    #[doc = "Return to launch location"]
1408    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1409    #[doc = "Land at location."]
1410    MAV_CMD_NAV_LAND = 21,
1411    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1412    MAV_CMD_NAV_TAKEOFF = 22,
1413    #[doc = "Land at local position (local frame only)"]
1414    MAV_CMD_NAV_LAND_LOCAL = 23,
1415    #[doc = "Takeoff from local position (local frame only)"]
1416    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1417    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1418    MAV_CMD_NAV_FOLLOW = 25,
1419    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1420    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1421    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1422    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1423    #[doc = "Begin following a target"]
1424    MAV_CMD_DO_FOLLOW = 32,
1425    #[doc = "Reposition the MAV after a follow target command has been sent"]
1426    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1427    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1428    MAV_CMD_DO_ORBIT = 34,
1429    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1430    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1431    MAV_CMD_NAV_ROI = 80,
1432    #[doc = "Control autonomous path planning on the MAV."]
1433    MAV_CMD_NAV_PATHPLANNING = 81,
1434    #[doc = "Navigate to waypoint using a spline path."]
1435    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1436    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1437    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1438    #[doc = "Land using VTOL mode"]
1439    MAV_CMD_NAV_VTOL_LAND = 85,
1440    #[doc = "hand control over to an external controller"]
1441    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1442    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1443    MAV_CMD_NAV_DELAY = 93,
1444    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1445    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1446    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1447    MAV_CMD_NAV_LAST = 95,
1448    #[doc = "Delay mission state machine."]
1449    MAV_CMD_CONDITION_DELAY = 112,
1450    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1451    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1452    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1453    MAV_CMD_CONDITION_DISTANCE = 114,
1454    #[doc = "Reach a certain target angle."]
1455    MAV_CMD_CONDITION_YAW = 115,
1456    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1457    MAV_CMD_CONDITION_LAST = 159,
1458    #[doc = "Set system mode."]
1459    MAV_CMD_DO_SET_MODE = 176,
1460    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1461    MAV_CMD_DO_JUMP = 177,
1462    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1463    MAV_CMD_DO_CHANGE_SPEED = 178,
1464    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1465    MAV_CMD_DO_SET_HOME = 179,
1466    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1467    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1468    MAV_CMD_DO_SET_PARAMETER = 180,
1469    #[doc = "Set a relay to a condition."]
1470    MAV_CMD_DO_SET_RELAY = 181,
1471    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1472    MAV_CMD_DO_REPEAT_RELAY = 182,
1473    #[doc = "Set a servo to a desired PWM value."]
1474    MAV_CMD_DO_SET_SERVO = 183,
1475    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1476    MAV_CMD_DO_REPEAT_SERVO = 184,
1477    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1478    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1479    #[doc = "Change altitude set point."]
1480    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1481    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1482    MAV_CMD_DO_SET_ACTUATOR = 187,
1483    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1484    MAV_CMD_DO_RETURN_PATH_START = 188,
1485    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1486    MAV_CMD_DO_LAND_START = 189,
1487    #[doc = "Mission command to perform a landing from a rally point."]
1488    MAV_CMD_DO_RALLY_LAND = 190,
1489    #[doc = "Mission command to safely abort an autonomous landing."]
1490    MAV_CMD_DO_GO_AROUND = 191,
1491    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1492    MAV_CMD_DO_REPOSITION = 192,
1493    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1494    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1495    #[doc = "Set moving direction to forward or reverse."]
1496    MAV_CMD_DO_SET_REVERSE = 194,
1497    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1498    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1499    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1500    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1501    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1502    MAV_CMD_DO_SET_ROI_NONE = 197,
1503    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1504    MAV_CMD_DO_SET_ROI_SYSID = 198,
1505    #[doc = "Control onboard camera system."]
1506    MAV_CMD_DO_CONTROL_VIDEO = 200,
1507    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1508    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1509    MAV_CMD_DO_SET_ROI = 201,
1510    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1511    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1512    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1513    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1514    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1515    #[doc = "Mission command to configure a camera or antenna mount"]
1516    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1517    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1518    #[doc = "Mission command to control a camera or antenna mount"]
1519    MAV_CMD_DO_MOUNT_CONTROL = 205,
1520    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1521    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1522    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1523    MAV_CMD_DO_FENCE_ENABLE = 207,
1524    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1525    MAV_CMD_DO_PARACHUTE = 208,
1526    #[doc = "Command to perform motor test."]
1527    MAV_CMD_DO_MOTOR_TEST = 209,
1528    #[doc = "Change to/from inverted flight."]
1529    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1530    #[doc = "Mission command to operate a gripper."]
1531    MAV_CMD_DO_GRIPPER = 211,
1532    #[doc = "Enable/disable autotune."]
1533    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1534    #[doc = "Sets a desired vehicle turn angle and speed change."]
1535    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1536    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1537    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1538    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1539    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1540    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1541    #[doc = "set id of master controller"]
1542    MAV_CMD_DO_GUIDED_MASTER = 221,
1543    #[doc = "Set limits for external control"]
1544    MAV_CMD_DO_GUIDED_LIMITS = 222,
1545    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1546    MAV_CMD_DO_ENGINE_CONTROL = 223,
1547    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1548    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1549    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1550    MAV_CMD_DO_LAST = 240,
1551    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1552    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1553    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1554    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1555    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1556    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1557    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1558    MAV_CMD_PREFLIGHT_STORAGE = 245,
1559    #[doc = "Request the reboot or shutdown of system components."]
1560    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1561    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1562    MAV_CMD_OVERRIDE_GOTO = 252,
1563    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1564    MAV_CMD_OBLIQUE_SURVEY = 260,
1565    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1566    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1567    #[doc = "start running a mission"]
1568    MAV_CMD_MISSION_START = 300,
1569    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1570    MAV_CMD_ACTUATOR_TEST = 310,
1571    #[doc = "Actuator configuration command."]
1572    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1573    #[doc = "Arms / Disarms a component"]
1574    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1575    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1576    MAV_CMD_RUN_PREARM_CHECKS = 401,
1577    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1578    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1579    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1580    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1581    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1582    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1583    MAV_CMD_GET_HOME_POSITION = 410,
1584    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1585    MAV_CMD_INJECT_FAILURE = 420,
1586    #[doc = "Starts receiver pairing."]
1587    MAV_CMD_START_RX_PAIR = 500,
1588    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1589    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1590    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1591    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1592    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1593    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1594    MAV_CMD_REQUEST_MESSAGE = 512,
1595    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1596    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1597    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1598    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1599    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1600    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1601    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1602    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1603    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1604    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1605    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1606    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1607    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1608    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1609    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1610    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1611    MAV_CMD_STORAGE_FORMAT = 526,
1612    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1613    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1614    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1615    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1616    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1617    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1618    #[doc = "Reset all camera settings to Factory Default"]
1619    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1620    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1621    MAV_CMD_SET_CAMERA_MODE = 530,
1622    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1623    MAV_CMD_SET_CAMERA_ZOOM = 531,
1624    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1625    MAV_CMD_SET_CAMERA_FOCUS = 532,
1626    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1627    MAV_CMD_SET_STORAGE_USAGE = 533,
1628    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1629    MAV_CMD_SET_CAMERA_SOURCE = 534,
1630    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1631    MAV_CMD_JUMP_TAG = 600,
1632    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1633    MAV_CMD_DO_JUMP_TAG = 601,
1634    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1635    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1636    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1637    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1638    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1639    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1640    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1641    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1642    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1643    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1644    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1645    #[doc = "Enable or disable on-board camera triggering system."]
1646    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1647    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1648    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1649    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1650    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1651    #[doc = "Stops ongoing tracking."]
1652    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1653    #[doc = "Starts video capture (recording)."]
1654    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1655    #[doc = "Stop the current video capture (recording)."]
1656    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1657    #[doc = "Start video streaming"]
1658    MAV_CMD_VIDEO_START_STREAMING = 2502,
1659    #[doc = "Stop the given video stream"]
1660    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1661    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1662    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1663    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1664    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1665    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1666    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1667    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1668    MAV_CMD_LOGGING_START = 2510,
1669    #[doc = "Request to stop streaming log data over MAVLink"]
1670    MAV_CMD_LOGGING_STOP = 2511,
1671    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1672    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1673    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1674    #[doc = "Create a panorama at the current position"]
1675    MAV_CMD_PANORAMA_CREATE = 2800,
1676    #[doc = "Request VTOL transition"]
1677    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1678    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1679    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1680    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1681    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1682    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1683    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1684    #[doc = "Delay mission state machine until gate has been reached."]
1685    MAV_CMD_CONDITION_GATE = 4501,
1686    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1687    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1688    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1689    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1690    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1691    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1692    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1693    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1694    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1695    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1696    #[doc = "Rally point. You can have multiple rally points defined."]
1697    MAV_CMD_NAV_RALLY_POINT = 5100,
1698    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1699    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1700    #[doc = "Change state of safety switch."]
1701    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1702    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1703    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1704    #[deprecated = "  (Deprecated since 2021-06)"]
1705    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1706    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1707    #[deprecated = "  (Deprecated since 2021-06)"]
1708    #[doc = "Control the payload deployment."]
1709    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1710    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1711    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1712    #[doc = "Command to operate winch."]
1713    MAV_CMD_DO_WINCH = 42600,
1714    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1715    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1716    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1717    MAV_CMD_WAYPOINT_USER_1 = 31000,
1718    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1719    MAV_CMD_WAYPOINT_USER_2 = 31001,
1720    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1721    MAV_CMD_WAYPOINT_USER_3 = 31002,
1722    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1723    MAV_CMD_WAYPOINT_USER_4 = 31003,
1724    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1725    MAV_CMD_WAYPOINT_USER_5 = 31004,
1726    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1727    MAV_CMD_SPATIAL_USER_1 = 31005,
1728    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1729    MAV_CMD_SPATIAL_USER_2 = 31006,
1730    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1731    MAV_CMD_SPATIAL_USER_3 = 31007,
1732    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1733    MAV_CMD_SPATIAL_USER_4 = 31008,
1734    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1735    MAV_CMD_SPATIAL_USER_5 = 31009,
1736    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1737    MAV_CMD_USER_1 = 31010,
1738    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1739    MAV_CMD_USER_2 = 31011,
1740    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1741    MAV_CMD_USER_3 = 31012,
1742    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1743    MAV_CMD_USER_4 = 31013,
1744    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1745    MAV_CMD_USER_5 = 31014,
1746    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1747    MAV_CMD_CAN_FORWARD = 32000,
1748}
1749impl MavCmd {
1750    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1751}
1752impl Default for MavCmd {
1753    fn default() -> Self {
1754        Self::DEFAULT
1755    }
1756}
1757#[cfg_attr(feature = "ts", derive(TS))]
1758#[cfg_attr(feature = "ts", ts(export))]
1759#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1761#[cfg_attr(feature = "serde", serde(tag = "type"))]
1762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1763#[repr(u32)]
1764#[doc = "Possible actions an aircraft can take to avoid a collision."]
1765pub enum MavCollisionAction {
1766    #[doc = "Ignore any potential collisions"]
1767    MAV_COLLISION_ACTION_NONE = 0,
1768    #[doc = "Report potential collision"]
1769    MAV_COLLISION_ACTION_REPORT = 1,
1770    #[doc = "Ascend or Descend to avoid threat"]
1771    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1772    #[doc = "Move horizontally to avoid threat"]
1773    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1774    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1775    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1776    #[doc = "Aircraft to fly directly back to its launch point"]
1777    MAV_COLLISION_ACTION_RTL = 5,
1778    #[doc = "Aircraft to stop in place"]
1779    MAV_COLLISION_ACTION_HOVER = 6,
1780}
1781impl MavCollisionAction {
1782    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1783}
1784impl Default for MavCollisionAction {
1785    fn default() -> Self {
1786        Self::DEFAULT
1787    }
1788}
1789#[cfg_attr(feature = "ts", derive(TS))]
1790#[cfg_attr(feature = "ts", ts(export))]
1791#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1793#[cfg_attr(feature = "serde", serde(tag = "type"))]
1794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1795#[repr(u32)]
1796#[doc = "Source of information about this collision."]
1797pub enum MavCollisionSrc {
1798    #[doc = "ID field references ADSB_VEHICLE packets"]
1799    MAV_COLLISION_SRC_ADSB = 0,
1800    #[doc = "ID field references MAVLink SRC ID"]
1801    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1802}
1803impl MavCollisionSrc {
1804    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1805}
1806impl Default for MavCollisionSrc {
1807    fn default() -> Self {
1808        Self::DEFAULT
1809    }
1810}
1811#[cfg_attr(feature = "ts", derive(TS))]
1812#[cfg_attr(feature = "ts", ts(export))]
1813#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1814#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1815#[cfg_attr(feature = "serde", serde(tag = "type"))]
1816#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1817#[repr(u32)]
1818#[doc = "Aircraft-rated danger from this threat."]
1819pub enum MavCollisionThreatLevel {
1820    #[doc = "Not a threat"]
1821    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1822    #[doc = "Craft is mildly concerned about this threat"]
1823    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1824    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1825    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1826}
1827impl MavCollisionThreatLevel {
1828    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1829}
1830impl Default for MavCollisionThreatLevel {
1831    fn default() -> Self {
1832        Self::DEFAULT
1833    }
1834}
1835#[cfg_attr(feature = "ts", derive(TS))]
1836#[cfg_attr(feature = "ts", ts(export))]
1837#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1838#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1839#[cfg_attr(feature = "serde", serde(tag = "type"))]
1840#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1841#[repr(u32)]
1842#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1843pub enum MavComponent {
1844    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1845    MAV_COMP_ID_ALL = 0,
1846    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1847    MAV_COMP_ID_AUTOPILOT1 = 1,
1848    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1849    MAV_COMP_ID_USER1 = 25,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER2 = 26,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER3 = 27,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER4 = 28,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER5 = 29,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER6 = 30,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER7 = 31,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER8 = 32,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER9 = 33,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER10 = 34,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER11 = 35,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER12 = 36,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER13 = 37,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER14 = 38,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER15 = 39,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER16 = 40,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER17 = 41,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER18 = 42,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER19 = 43,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER20 = 44,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER21 = 45,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER22 = 46,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER23 = 47,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER24 = 48,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER25 = 49,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER26 = 50,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER27 = 51,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER28 = 52,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER29 = 53,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER30 = 54,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER31 = 55,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER32 = 56,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER33 = 57,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER34 = 58,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER35 = 59,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER36 = 60,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER37 = 61,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER38 = 62,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER39 = 63,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER40 = 64,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER41 = 65,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER42 = 66,
1932    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1933    MAV_COMP_ID_USER43 = 67,
1934    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1935    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER45 = 69,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER46 = 70,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER47 = 71,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER48 = 72,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER49 = 73,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER50 = 74,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER51 = 75,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER52 = 76,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER53 = 77,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER54 = 78,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER55 = 79,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER56 = 80,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER57 = 81,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER58 = 82,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER59 = 83,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER60 = 84,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER61 = 85,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER62 = 86,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER63 = 87,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER64 = 88,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER65 = 89,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER66 = 90,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER67 = 91,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER68 = 92,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER69 = 93,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER70 = 94,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER71 = 95,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER72 = 96,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER73 = 97,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER74 = 98,
1996    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1997    MAV_COMP_ID_USER75 = 99,
1998    #[doc = "Camera #1."]
1999    MAV_COMP_ID_CAMERA = 100,
2000    #[doc = "Camera #2."]
2001    MAV_COMP_ID_CAMERA2 = 101,
2002    #[doc = "Camera #3."]
2003    MAV_COMP_ID_CAMERA3 = 102,
2004    #[doc = "Camera #4."]
2005    MAV_COMP_ID_CAMERA4 = 103,
2006    #[doc = "Camera #5."]
2007    MAV_COMP_ID_CAMERA5 = 104,
2008    #[doc = "Camera #6."]
2009    MAV_COMP_ID_CAMERA6 = 105,
2010    #[doc = "Servo #1."]
2011    MAV_COMP_ID_SERVO1 = 140,
2012    #[doc = "Servo #2."]
2013    MAV_COMP_ID_SERVO2 = 141,
2014    #[doc = "Servo #3."]
2015    MAV_COMP_ID_SERVO3 = 142,
2016    #[doc = "Servo #4."]
2017    MAV_COMP_ID_SERVO4 = 143,
2018    #[doc = "Servo #5."]
2019    MAV_COMP_ID_SERVO5 = 144,
2020    #[doc = "Servo #6."]
2021    MAV_COMP_ID_SERVO6 = 145,
2022    #[doc = "Servo #7."]
2023    MAV_COMP_ID_SERVO7 = 146,
2024    #[doc = "Servo #8."]
2025    MAV_COMP_ID_SERVO8 = 147,
2026    #[doc = "Servo #9."]
2027    MAV_COMP_ID_SERVO9 = 148,
2028    #[doc = "Servo #10."]
2029    MAV_COMP_ID_SERVO10 = 149,
2030    #[doc = "Servo #11."]
2031    MAV_COMP_ID_SERVO11 = 150,
2032    #[doc = "Servo #12."]
2033    MAV_COMP_ID_SERVO12 = 151,
2034    #[doc = "Servo #13."]
2035    MAV_COMP_ID_SERVO13 = 152,
2036    #[doc = "Servo #14."]
2037    MAV_COMP_ID_SERVO14 = 153,
2038    #[doc = "Gimbal #1."]
2039    MAV_COMP_ID_GIMBAL = 154,
2040    #[doc = "Logging component."]
2041    MAV_COMP_ID_LOG = 155,
2042    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2043    MAV_COMP_ID_ADSB = 156,
2044    #[doc = "On Screen Display (OSD) devices for video links."]
2045    MAV_COMP_ID_OSD = 157,
2046    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2047    MAV_COMP_ID_PERIPHERAL = 158,
2048    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2049    #[doc = "Gimbal ID for QX1."]
2050    MAV_COMP_ID_QX1_GIMBAL = 159,
2051    #[doc = "FLARM collision alert component."]
2052    MAV_COMP_ID_FLARM = 160,
2053    #[doc = "Parachute component."]
2054    MAV_COMP_ID_PARACHUTE = 161,
2055    #[doc = "Winch component."]
2056    MAV_COMP_ID_WINCH = 169,
2057    #[doc = "Gimbal #2."]
2058    MAV_COMP_ID_GIMBAL2 = 171,
2059    #[doc = "Gimbal #3."]
2060    MAV_COMP_ID_GIMBAL3 = 172,
2061    #[doc = "Gimbal #4"]
2062    MAV_COMP_ID_GIMBAL4 = 173,
2063    #[doc = "Gimbal #5."]
2064    MAV_COMP_ID_GIMBAL5 = 174,
2065    #[doc = "Gimbal #6."]
2066    MAV_COMP_ID_GIMBAL6 = 175,
2067    #[doc = "Battery #1."]
2068    MAV_COMP_ID_BATTERY = 180,
2069    #[doc = "Battery #2."]
2070    MAV_COMP_ID_BATTERY2 = 181,
2071    #[doc = "CAN over MAVLink client."]
2072    MAV_COMP_ID_MAVCAN = 189,
2073    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2074    MAV_COMP_ID_MISSIONPLANNER = 190,
2075    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2076    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2077    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2078    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2079    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2080    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2081    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2082    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2083    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2084    MAV_COMP_ID_PATHPLANNER = 195,
2085    #[doc = "Component that plans a collision free path between two points."]
2086    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2087    #[doc = "Component that provides position estimates using VIO techniques."]
2088    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2089    #[doc = "Component that manages pairing of vehicle and GCS."]
2090    MAV_COMP_ID_PAIRING_MANAGER = 198,
2091    #[doc = "Inertial Measurement Unit (IMU) #1."]
2092    MAV_COMP_ID_IMU = 200,
2093    #[doc = "Inertial Measurement Unit (IMU) #2."]
2094    MAV_COMP_ID_IMU_2 = 201,
2095    #[doc = "Inertial Measurement Unit (IMU) #3."]
2096    MAV_COMP_ID_IMU_3 = 202,
2097    #[doc = "GPS #1."]
2098    MAV_COMP_ID_GPS = 220,
2099    #[doc = "GPS #2."]
2100    MAV_COMP_ID_GPS2 = 221,
2101    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2102    MAV_COMP_ID_ODID_TXRX_1 = 236,
2103    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2104    MAV_COMP_ID_ODID_TXRX_2 = 237,
2105    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2106    MAV_COMP_ID_ODID_TXRX_3 = 238,
2107    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2108    MAV_COMP_ID_UDP_BRIDGE = 240,
2109    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2110    MAV_COMP_ID_UART_BRIDGE = 241,
2111    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2112    MAV_COMP_ID_TUNNEL_NODE = 242,
2113    #[doc = "Illuminator"]
2114    MAV_COMP_ID_ILLUMINATOR = 243,
2115    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2116    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2117    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2118}
2119impl MavComponent {
2120    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2121}
2122impl Default for MavComponent {
2123    fn default() -> Self {
2124        Self::DEFAULT
2125    }
2126}
2127#[cfg_attr(feature = "ts", derive(TS))]
2128#[cfg_attr(feature = "ts", ts(export))]
2129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2131#[cfg_attr(feature = "serde", serde(tag = "type"))]
2132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2133#[repr(u32)]
2134#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2135#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2136pub enum MavDataStream {
2137    #[doc = "Enable all data streams"]
2138    MAV_DATA_STREAM_ALL = 0,
2139    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2140    MAV_DATA_STREAM_RAW_SENSORS = 1,
2141    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2142    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2143    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2144    MAV_DATA_STREAM_RC_CHANNELS = 3,
2145    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2146    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2147    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2148    MAV_DATA_STREAM_POSITION = 6,
2149    #[doc = "Dependent on the autopilot"]
2150    MAV_DATA_STREAM_EXTRA1 = 10,
2151    #[doc = "Dependent on the autopilot"]
2152    MAV_DATA_STREAM_EXTRA2 = 11,
2153    #[doc = "Dependent on the autopilot"]
2154    MAV_DATA_STREAM_EXTRA3 = 12,
2155}
2156impl MavDataStream {
2157    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2158}
2159impl Default for MavDataStream {
2160    fn default() -> Self {
2161        Self::DEFAULT
2162    }
2163}
2164#[cfg_attr(feature = "ts", derive(TS))]
2165#[cfg_attr(feature = "ts", ts(export))]
2166#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2168#[cfg_attr(feature = "serde", serde(tag = "type"))]
2169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2170#[repr(u32)]
2171#[doc = "Enumeration of distance sensor types"]
2172pub enum MavDistanceSensor {
2173    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2174    MAV_DISTANCE_SENSOR_LASER = 0,
2175    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2176    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2177    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2178    MAV_DISTANCE_SENSOR_INFRARED = 2,
2179    #[doc = "Radar type, e.g. uLanding units"]
2180    MAV_DISTANCE_SENSOR_RADAR = 3,
2181    #[doc = "Broken or unknown type, e.g. analog units"]
2182    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2183}
2184impl MavDistanceSensor {
2185    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2186}
2187impl Default for MavDistanceSensor {
2188    fn default() -> Self {
2189        Self::DEFAULT
2190    }
2191}
2192#[cfg_attr(feature = "ts", derive(TS))]
2193#[cfg_attr(feature = "ts", ts(export))]
2194#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2196#[cfg_attr(feature = "serde", serde(tag = "type"))]
2197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2198#[repr(u32)]
2199#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2200pub enum MavDoRepositionFlags {
2201    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2202    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2203}
2204impl MavDoRepositionFlags {
2205    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2206}
2207impl Default for MavDoRepositionFlags {
2208    fn default() -> Self {
2209        Self::DEFAULT
2210    }
2211}
2212#[cfg_attr(feature = "ts", derive(TS))]
2213#[cfg_attr(feature = "ts", ts(export))]
2214#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2216#[cfg_attr(feature = "serde", serde(tag = "type"))]
2217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2218#[repr(u32)]
2219#[doc = "Enumeration of estimator types"]
2220pub enum MavEstimatorType {
2221    #[doc = "Unknown type of the estimator."]
2222    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2223    #[doc = "This is a naive estimator without any real covariance feedback."]
2224    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2225    #[doc = "Computer vision based estimate. Might be up to scale."]
2226    MAV_ESTIMATOR_TYPE_VISION = 2,
2227    #[doc = "Visual-inertial estimate."]
2228    MAV_ESTIMATOR_TYPE_VIO = 3,
2229    #[doc = "Plain GPS estimate."]
2230    MAV_ESTIMATOR_TYPE_GPS = 4,
2231    #[doc = "Estimator integrating GPS and inertial sensing."]
2232    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2233    #[doc = "Estimate from external motion capturing system."]
2234    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2235    #[doc = "Estimator based on lidar sensor input."]
2236    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2237    #[doc = "Estimator on autopilot."]
2238    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2239}
2240impl MavEstimatorType {
2241    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2242}
2243impl Default for MavEstimatorType {
2244    fn default() -> Self {
2245        Self::DEFAULT
2246    }
2247}
2248#[cfg_attr(feature = "ts", derive(TS))]
2249#[cfg_attr(feature = "ts", ts(export))]
2250#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2251#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2252#[cfg_attr(feature = "serde", serde(tag = "type"))]
2253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2254#[repr(u32)]
2255#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2256pub enum MavEventCurrentSequenceFlags {
2257    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2258    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2259}
2260impl MavEventCurrentSequenceFlags {
2261    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2262}
2263impl Default for MavEventCurrentSequenceFlags {
2264    fn default() -> Self {
2265        Self::DEFAULT
2266    }
2267}
2268#[cfg_attr(feature = "ts", derive(TS))]
2269#[cfg_attr(feature = "ts", ts(export))]
2270#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2272#[cfg_attr(feature = "serde", serde(tag = "type"))]
2273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2274#[repr(u32)]
2275#[doc = "Reason for an event error response."]
2276pub enum MavEventErrorReason {
2277    #[doc = "The requested event is not available (anymore)."]
2278    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2279}
2280impl MavEventErrorReason {
2281    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2282}
2283impl Default for MavEventErrorReason {
2284    fn default() -> Self {
2285        Self::DEFAULT
2286    }
2287}
2288#[cfg_attr(feature = "ts", derive(TS))]
2289#[cfg_attr(feature = "ts", ts(export))]
2290#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2291#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2292#[cfg_attr(feature = "serde", serde(tag = "type"))]
2293#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2294#[repr(u32)]
2295#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2296pub enum MavFrame {
2297    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2298    MAV_FRAME_GLOBAL = 0,
2299    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2300    MAV_FRAME_LOCAL_NED = 1,
2301    #[doc = "NOT a coordinate frame, indicates a mission command."]
2302    MAV_FRAME_MISSION = 2,
2303    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2304    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2305    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2306    MAV_FRAME_LOCAL_ENU = 4,
2307    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2308    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2309    MAV_FRAME_GLOBAL_INT = 5,
2310    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2311    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2312    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2313    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2314    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2315    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2316    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2317    MAV_FRAME_BODY_NED = 8,
2318    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2319    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2320    MAV_FRAME_BODY_OFFSET_NED = 9,
2321    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2322    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2323    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2324    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2325    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2326    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2327    MAV_FRAME_BODY_FRD = 12,
2328    #[deprecated = "  (Deprecated since 2019-04)"]
2329    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2330    MAV_FRAME_RESERVED_13 = 13,
2331    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2332    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2333    MAV_FRAME_RESERVED_14 = 14,
2334    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2335    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2336    MAV_FRAME_RESERVED_15 = 15,
2337    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2338    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2339    MAV_FRAME_RESERVED_16 = 16,
2340    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2341    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2342    MAV_FRAME_RESERVED_17 = 17,
2343    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2344    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2345    MAV_FRAME_RESERVED_18 = 18,
2346    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2347    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2348    MAV_FRAME_RESERVED_19 = 19,
2349    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2350    MAV_FRAME_LOCAL_FRD = 20,
2351    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2352    MAV_FRAME_LOCAL_FLU = 21,
2353}
2354impl MavFrame {
2355    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2356}
2357impl Default for MavFrame {
2358    fn default() -> Self {
2359        Self::DEFAULT
2360    }
2361}
2362#[cfg_attr(feature = "ts", derive(TS))]
2363#[cfg_attr(feature = "ts", ts(export))]
2364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2366#[cfg_attr(feature = "serde", serde(tag = "type"))]
2367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2368#[repr(u32)]
2369#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2370pub enum MavFtpErr {
2371    #[doc = "None: No error"]
2372    MAV_FTP_ERR_NONE = 0,
2373    #[doc = "Fail: Unknown failure"]
2374    MAV_FTP_ERR_FAIL = 1,
2375    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2376    MAV_FTP_ERR_FAILERRNO = 2,
2377    #[doc = "InvalidDataSize: Payload size is invalid"]
2378    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2379    #[doc = "InvalidSession: Session is not currently open"]
2380    MAV_FTP_ERR_INVALIDSESSION = 4,
2381    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2382    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2383    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2384    MAV_FTP_ERR_EOF = 6,
2385    #[doc = "UnknownCommand: Unknown command / opcode"]
2386    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2387    #[doc = "FileExists: File/directory already exists"]
2388    MAV_FTP_ERR_FILEEXISTS = 8,
2389    #[doc = "FileProtected: File/directory is write protected"]
2390    MAV_FTP_ERR_FILEPROTECTED = 9,
2391    #[doc = "FileNotFound: File/directory not found"]
2392    MAV_FTP_ERR_FILENOTFOUND = 10,
2393}
2394impl MavFtpErr {
2395    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2396}
2397impl Default for MavFtpErr {
2398    fn default() -> Self {
2399        Self::DEFAULT
2400    }
2401}
2402#[cfg_attr(feature = "ts", derive(TS))]
2403#[cfg_attr(feature = "ts", ts(export))]
2404#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2406#[cfg_attr(feature = "serde", serde(tag = "type"))]
2407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2408#[repr(u32)]
2409#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2410pub enum MavFtpOpcode {
2411    #[doc = "None. Ignored, always ACKed"]
2412    MAV_FTP_OPCODE_NONE = 0,
2413    #[doc = "TerminateSession: Terminates open Read session"]
2414    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2415    #[doc = "ResetSessions: Terminates all open read sessions"]
2416    MAV_FTP_OPCODE_RESETSESSION = 2,
2417    #[doc = "ListDirectory. List files and directories in path from offset"]
2418    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2419    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2420    MAV_FTP_OPCODE_OPENFILERO = 4,
2421    #[doc = "ReadFile: Reads size bytes from offset in session"]
2422    MAV_FTP_OPCODE_READFILE = 5,
2423    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2424    MAV_FTP_OPCODE_CREATEFILE = 6,
2425    #[doc = "WriteFile: Writes size bytes to offset in session"]
2426    MAV_FTP_OPCODE_WRITEFILE = 7,
2427    #[doc = "RemoveFile: Remove file at path"]
2428    MAV_FTP_OPCODE_REMOVEFILE = 8,
2429    #[doc = "CreateDirectory: Creates directory at path"]
2430    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2431    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2432    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2433    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2434    MAV_FTP_OPCODE_OPENFILEWO = 11,
2435    #[doc = "TruncateFile: Truncate file at path to offset length"]
2436    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2437    #[doc = "Rename: Rename path1 to path2"]
2438    MAV_FTP_OPCODE_RENAME = 13,
2439    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2440    MAV_FTP_OPCODE_CALCFILECRC = 14,
2441    #[doc = "BurstReadFile: Burst download session file"]
2442    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2443    #[doc = "ACK: ACK response"]
2444    MAV_FTP_OPCODE_ACK = 128,
2445    #[doc = "NAK: NAK response"]
2446    MAV_FTP_OPCODE_NAK = 129,
2447}
2448impl MavFtpOpcode {
2449    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2450}
2451impl Default for MavFtpOpcode {
2452    fn default() -> Self {
2453        Self::DEFAULT
2454    }
2455}
2456#[cfg_attr(feature = "ts", derive(TS))]
2457#[cfg_attr(feature = "ts", ts(export))]
2458#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2459#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2460#[cfg_attr(feature = "serde", serde(tag = "type"))]
2461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2462#[repr(u32)]
2463#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2464pub enum MavFuelType {
2465    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2466    MAV_FUEL_TYPE_UNKNOWN = 0,
2467    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2468    MAV_FUEL_TYPE_LIQUID = 1,
2469    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2470    MAV_FUEL_TYPE_GAS = 2,
2471}
2472impl MavFuelType {
2473    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2474}
2475impl Default for MavFuelType {
2476    fn default() -> Self {
2477        Self::DEFAULT
2478    }
2479}
2480bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2481impl MavGeneratorStatusFlag {
2482    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2483}
2484impl Default for MavGeneratorStatusFlag {
2485    fn default() -> Self {
2486        Self::DEFAULT
2487    }
2488}
2489#[cfg_attr(feature = "ts", derive(TS))]
2490#[cfg_attr(feature = "ts", ts(export))]
2491#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2493#[cfg_attr(feature = "serde", serde(tag = "type"))]
2494#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2495#[repr(u32)]
2496#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2497pub enum MavGoto {
2498    #[doc = "Hold at the current position."]
2499    MAV_GOTO_DO_HOLD = 0,
2500    #[doc = "Continue with the next item in mission execution."]
2501    MAV_GOTO_DO_CONTINUE = 1,
2502    #[doc = "Hold at the current position of the system"]
2503    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2504    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2505    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2506}
2507impl MavGoto {
2508    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2509}
2510impl Default for MavGoto {
2511    fn default() -> Self {
2512        Self::DEFAULT
2513    }
2514}
2515#[cfg_attr(feature = "ts", derive(TS))]
2516#[cfg_attr(feature = "ts", ts(export))]
2517#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2519#[cfg_attr(feature = "serde", serde(tag = "type"))]
2520#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2521#[repr(u32)]
2522#[doc = "Enumeration of landed detector states"]
2523pub enum MavLandedState {
2524    #[doc = "MAV landed state is unknown"]
2525    MAV_LANDED_STATE_UNDEFINED = 0,
2526    #[doc = "MAV is landed (on ground)"]
2527    MAV_LANDED_STATE_ON_GROUND = 1,
2528    #[doc = "MAV is in air"]
2529    MAV_LANDED_STATE_IN_AIR = 2,
2530    #[doc = "MAV currently taking off"]
2531    MAV_LANDED_STATE_TAKEOFF = 3,
2532    #[doc = "MAV currently landing"]
2533    MAV_LANDED_STATE_LANDING = 4,
2534}
2535impl MavLandedState {
2536    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2537}
2538impl Default for MavLandedState {
2539    fn default() -> Self {
2540        Self::DEFAULT
2541    }
2542}
2543#[cfg_attr(feature = "ts", derive(TS))]
2544#[cfg_attr(feature = "ts", ts(export))]
2545#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2547#[cfg_attr(feature = "serde", serde(tag = "type"))]
2548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2549#[repr(u32)]
2550#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2551pub enum MavMissionResult {
2552    #[doc = "mission accepted OK"]
2553    MAV_MISSION_ACCEPTED = 0,
2554    #[doc = "Generic error / not accepting mission commands at all right now."]
2555    MAV_MISSION_ERROR = 1,
2556    #[doc = "Coordinate frame is not supported."]
2557    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2558    #[doc = "Command is not supported."]
2559    MAV_MISSION_UNSUPPORTED = 3,
2560    #[doc = "Mission items exceed storage space."]
2561    MAV_MISSION_NO_SPACE = 4,
2562    #[doc = "One of the parameters has an invalid value."]
2563    MAV_MISSION_INVALID = 5,
2564    #[doc = "param1 has an invalid value."]
2565    MAV_MISSION_INVALID_PARAM1 = 6,
2566    #[doc = "param2 has an invalid value."]
2567    MAV_MISSION_INVALID_PARAM2 = 7,
2568    #[doc = "param3 has an invalid value."]
2569    MAV_MISSION_INVALID_PARAM3 = 8,
2570    #[doc = "param4 has an invalid value."]
2571    MAV_MISSION_INVALID_PARAM4 = 9,
2572    #[doc = "x / param5 has an invalid value."]
2573    MAV_MISSION_INVALID_PARAM5_X = 10,
2574    #[doc = "y / param6 has an invalid value."]
2575    MAV_MISSION_INVALID_PARAM6_Y = 11,
2576    #[doc = "z / param7 has an invalid value."]
2577    MAV_MISSION_INVALID_PARAM7 = 12,
2578    #[doc = "Mission item received out of sequence"]
2579    MAV_MISSION_INVALID_SEQUENCE = 13,
2580    #[doc = "Not accepting any mission commands from this communication partner."]
2581    MAV_MISSION_DENIED = 14,
2582    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2583    MAV_MISSION_OPERATION_CANCELLED = 15,
2584}
2585impl MavMissionResult {
2586    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2587}
2588impl Default for MavMissionResult {
2589    fn default() -> Self {
2590        Self::DEFAULT
2591    }
2592}
2593#[cfg_attr(feature = "ts", derive(TS))]
2594#[cfg_attr(feature = "ts", ts(export))]
2595#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2597#[cfg_attr(feature = "serde", serde(tag = "type"))]
2598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2599#[repr(u32)]
2600#[doc = "Type of mission items being requested/sent in mission protocol."]
2601pub enum MavMissionType {
2602    #[doc = "Items are mission commands for main mission."]
2603    MAV_MISSION_TYPE_MISSION = 0,
2604    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2605    MAV_MISSION_TYPE_FENCE = 1,
2606    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2607    MAV_MISSION_TYPE_RALLY = 2,
2608    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2609    MAV_MISSION_TYPE_ALL = 255,
2610}
2611impl MavMissionType {
2612    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2613}
2614impl Default for MavMissionType {
2615    fn default() -> Self {
2616        Self::DEFAULT
2617    }
2618}
2619#[cfg_attr(feature = "ts", derive(TS))]
2620#[cfg_attr(feature = "ts", ts(export))]
2621#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2622#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2623#[cfg_attr(feature = "serde", serde(tag = "type"))]
2624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2625#[repr(u32)]
2626#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2627pub enum MavMode {
2628    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2629    MAV_MODE_PREFLIGHT = 0,
2630    #[doc = "System is allowed to be active, under assisted RC control."]
2631    MAV_MODE_STABILIZE_DISARMED = 80,
2632    #[doc = "System is allowed to be active, under assisted RC control."]
2633    MAV_MODE_STABILIZE_ARMED = 208,
2634    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2635    MAV_MODE_MANUAL_DISARMED = 64,
2636    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2637    MAV_MODE_MANUAL_ARMED = 192,
2638    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2639    MAV_MODE_GUIDED_DISARMED = 88,
2640    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2641    MAV_MODE_GUIDED_ARMED = 216,
2642    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2643    MAV_MODE_AUTO_DISARMED = 92,
2644    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2645    MAV_MODE_AUTO_ARMED = 220,
2646    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2647    MAV_MODE_TEST_DISARMED = 66,
2648    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2649    MAV_MODE_TEST_ARMED = 194,
2650}
2651impl MavMode {
2652    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2653}
2654impl Default for MavMode {
2655    fn default() -> Self {
2656        Self::DEFAULT
2657    }
2658}
2659bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2660impl MavModeFlag {
2661    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2662}
2663impl Default for MavModeFlag {
2664    fn default() -> Self {
2665        Self::DEFAULT
2666    }
2667}
2668#[cfg_attr(feature = "ts", derive(TS))]
2669#[cfg_attr(feature = "ts", ts(export))]
2670#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2671#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2672#[cfg_attr(feature = "serde", serde(tag = "type"))]
2673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2674#[repr(u32)]
2675#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2676pub enum MavModeFlagDecodePosition {
2677    #[doc = "First bit:  10000000"]
2678    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2679    #[doc = "Second bit: 01000000"]
2680    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2681    #[doc = "Third bit:  00100000"]
2682    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2683    #[doc = "Fourth bit: 00010000"]
2684    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2685    #[doc = "Fifth bit:  00001000"]
2686    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2687    #[doc = "Sixth bit:   00000100"]
2688    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2689    #[doc = "Seventh bit: 00000010"]
2690    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2691    #[doc = "Eighth bit: 00000001"]
2692    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2693}
2694impl MavModeFlagDecodePosition {
2695    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2696}
2697impl Default for MavModeFlagDecodePosition {
2698    fn default() -> Self {
2699        Self::DEFAULT
2700    }
2701}
2702bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2703impl MavModeProperty {
2704    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2705}
2706impl Default for MavModeProperty {
2707    fn default() -> Self {
2708        Self::DEFAULT
2709    }
2710}
2711#[cfg_attr(feature = "ts", derive(TS))]
2712#[cfg_attr(feature = "ts", ts(export))]
2713#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2715#[cfg_attr(feature = "serde", serde(tag = "type"))]
2716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2717#[repr(u32)]
2718#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2719#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2720pub enum MavMountMode {
2721    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2722    MAV_MOUNT_MODE_RETRACT = 0,
2723    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2724    MAV_MOUNT_MODE_NEUTRAL = 1,
2725    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2726    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2727    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2728    MAV_MOUNT_MODE_RC_TARGETING = 3,
2729    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2730    MAV_MOUNT_MODE_GPS_POINT = 4,
2731    #[doc = "Gimbal tracks system with specified system ID"]
2732    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2733    #[doc = "Gimbal tracks home position"]
2734    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2735}
2736impl MavMountMode {
2737    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2738}
2739impl Default for MavMountMode {
2740    fn default() -> Self {
2741        Self::DEFAULT
2742    }
2743}
2744#[cfg_attr(feature = "ts", derive(TS))]
2745#[cfg_attr(feature = "ts", ts(export))]
2746#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2748#[cfg_attr(feature = "serde", serde(tag = "type"))]
2749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2750#[repr(u32)]
2751pub enum MavOdidArmStatus {
2752    #[doc = "Passing arming checks."]
2753    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2754    #[doc = "Generic arming failure, see error string for details."]
2755    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2756}
2757impl MavOdidArmStatus {
2758    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2759}
2760impl Default for MavOdidArmStatus {
2761    fn default() -> Self {
2762        Self::DEFAULT
2763    }
2764}
2765#[cfg_attr(feature = "ts", derive(TS))]
2766#[cfg_attr(feature = "ts", ts(export))]
2767#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2768#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2769#[cfg_attr(feature = "serde", serde(tag = "type"))]
2770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2771#[repr(u32)]
2772pub enum MavOdidAuthType {
2773    #[doc = "No authentication type is specified."]
2774    MAV_ODID_AUTH_TYPE_NONE = 0,
2775    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2776    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2777    #[doc = "Signature for the Operator ID."]
2778    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2779    #[doc = "Signature for the entire message set."]
2780    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2781    #[doc = "Authentication is provided by Network Remote ID."]
2782    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2783    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2784    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2785}
2786impl MavOdidAuthType {
2787    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2788}
2789impl Default for MavOdidAuthType {
2790    fn default() -> Self {
2791        Self::DEFAULT
2792    }
2793}
2794#[cfg_attr(feature = "ts", derive(TS))]
2795#[cfg_attr(feature = "ts", ts(export))]
2796#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2798#[cfg_attr(feature = "serde", serde(tag = "type"))]
2799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2800#[repr(u32)]
2801pub enum MavOdidCategoryEu {
2802    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2803    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2804    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2805    MAV_ODID_CATEGORY_EU_OPEN = 1,
2806    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2807    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2808    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2809    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2810}
2811impl MavOdidCategoryEu {
2812    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2813}
2814impl Default for MavOdidCategoryEu {
2815    fn default() -> Self {
2816        Self::DEFAULT
2817    }
2818}
2819#[cfg_attr(feature = "ts", derive(TS))]
2820#[cfg_attr(feature = "ts", ts(export))]
2821#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2822#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2823#[cfg_attr(feature = "serde", serde(tag = "type"))]
2824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2825#[repr(u32)]
2826pub enum MavOdidClassEu {
2827    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2828    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2829    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2830    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2831    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2832    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2833    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2834    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2835    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2836    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2837    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2838    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2839    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2840    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2841    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2842    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2843}
2844impl MavOdidClassEu {
2845    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2846}
2847impl Default for MavOdidClassEu {
2848    fn default() -> Self {
2849        Self::DEFAULT
2850    }
2851}
2852#[cfg_attr(feature = "ts", derive(TS))]
2853#[cfg_attr(feature = "ts", ts(export))]
2854#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2856#[cfg_attr(feature = "serde", serde(tag = "type"))]
2857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2858#[repr(u32)]
2859pub enum MavOdidClassificationType {
2860    #[doc = "The classification type for the UA is undeclared."]
2861    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2862    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2863    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2864}
2865impl MavOdidClassificationType {
2866    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2867}
2868impl Default for MavOdidClassificationType {
2869    fn default() -> Self {
2870        Self::DEFAULT
2871    }
2872}
2873#[cfg_attr(feature = "ts", derive(TS))]
2874#[cfg_attr(feature = "ts", ts(export))]
2875#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2876#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2877#[cfg_attr(feature = "serde", serde(tag = "type"))]
2878#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2879#[repr(u32)]
2880pub enum MavOdidDescType {
2881    #[doc = "Optional free-form text description of the purpose of the flight."]
2882    MAV_ODID_DESC_TYPE_TEXT = 0,
2883    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2884    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2885    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2886    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2887}
2888impl MavOdidDescType {
2889    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2890}
2891impl Default for MavOdidDescType {
2892    fn default() -> Self {
2893        Self::DEFAULT
2894    }
2895}
2896#[cfg_attr(feature = "ts", derive(TS))]
2897#[cfg_attr(feature = "ts", ts(export))]
2898#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2899#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2900#[cfg_attr(feature = "serde", serde(tag = "type"))]
2901#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2902#[repr(u32)]
2903pub enum MavOdidHeightRef {
2904    #[doc = "The height field is relative to the take-off location."]
2905    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2906    #[doc = "The height field is relative to ground."]
2907    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2908}
2909impl MavOdidHeightRef {
2910    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2911}
2912impl Default for MavOdidHeightRef {
2913    fn default() -> Self {
2914        Self::DEFAULT
2915    }
2916}
2917#[cfg_attr(feature = "ts", derive(TS))]
2918#[cfg_attr(feature = "ts", ts(export))]
2919#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2921#[cfg_attr(feature = "serde", serde(tag = "type"))]
2922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2923#[repr(u32)]
2924pub enum MavOdidHorAcc {
2925    #[doc = "The horizontal accuracy is unknown."]
2926    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2927    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2928    MAV_ODID_HOR_ACC_10NM = 1,
2929    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2930    MAV_ODID_HOR_ACC_4NM = 2,
2931    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2932    MAV_ODID_HOR_ACC_2NM = 3,
2933    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2934    MAV_ODID_HOR_ACC_1NM = 4,
2935    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2936    MAV_ODID_HOR_ACC_0_5NM = 5,
2937    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2938    MAV_ODID_HOR_ACC_0_3NM = 6,
2939    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2940    MAV_ODID_HOR_ACC_0_1NM = 7,
2941    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2942    MAV_ODID_HOR_ACC_0_05NM = 8,
2943    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2944    MAV_ODID_HOR_ACC_30_METER = 9,
2945    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2946    MAV_ODID_HOR_ACC_10_METER = 10,
2947    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2948    MAV_ODID_HOR_ACC_3_METER = 11,
2949    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2950    MAV_ODID_HOR_ACC_1_METER = 12,
2951}
2952impl MavOdidHorAcc {
2953    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2954}
2955impl Default for MavOdidHorAcc {
2956    fn default() -> Self {
2957        Self::DEFAULT
2958    }
2959}
2960#[cfg_attr(feature = "ts", derive(TS))]
2961#[cfg_attr(feature = "ts", ts(export))]
2962#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2963#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2964#[cfg_attr(feature = "serde", serde(tag = "type"))]
2965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2966#[repr(u32)]
2967pub enum MavOdidIdType {
2968    #[doc = "No type defined."]
2969    MAV_ODID_ID_TYPE_NONE = 0,
2970    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2971    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2972    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2973    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2974    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2975    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2976    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2977    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2978}
2979impl MavOdidIdType {
2980    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2981}
2982impl Default for MavOdidIdType {
2983    fn default() -> Self {
2984        Self::DEFAULT
2985    }
2986}
2987#[cfg_attr(feature = "ts", derive(TS))]
2988#[cfg_attr(feature = "ts", ts(export))]
2989#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2990#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2991#[cfg_attr(feature = "serde", serde(tag = "type"))]
2992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2993#[repr(u32)]
2994pub enum MavOdidOperatorIdType {
2995    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2996    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2997}
2998impl MavOdidOperatorIdType {
2999    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3000}
3001impl Default for MavOdidOperatorIdType {
3002    fn default() -> Self {
3003        Self::DEFAULT
3004    }
3005}
3006#[cfg_attr(feature = "ts", derive(TS))]
3007#[cfg_attr(feature = "ts", ts(export))]
3008#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3010#[cfg_attr(feature = "serde", serde(tag = "type"))]
3011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3012#[repr(u32)]
3013pub enum MavOdidOperatorLocationType {
3014    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3015    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3016    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3017    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3018    #[doc = "The location/altitude of the operator are fixed values."]
3019    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3020}
3021impl MavOdidOperatorLocationType {
3022    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3023}
3024impl Default for MavOdidOperatorLocationType {
3025    fn default() -> Self {
3026        Self::DEFAULT
3027    }
3028}
3029#[cfg_attr(feature = "ts", derive(TS))]
3030#[cfg_attr(feature = "ts", ts(export))]
3031#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3033#[cfg_attr(feature = "serde", serde(tag = "type"))]
3034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3035#[repr(u32)]
3036pub enum MavOdidSpeedAcc {
3037    #[doc = "The speed accuracy is unknown."]
3038    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3039    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3040    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3041    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3042    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3043    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3044    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3045    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3046    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3047}
3048impl MavOdidSpeedAcc {
3049    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3050}
3051impl Default for MavOdidSpeedAcc {
3052    fn default() -> Self {
3053        Self::DEFAULT
3054    }
3055}
3056#[cfg_attr(feature = "ts", derive(TS))]
3057#[cfg_attr(feature = "ts", ts(export))]
3058#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3060#[cfg_attr(feature = "serde", serde(tag = "type"))]
3061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3062#[repr(u32)]
3063pub enum MavOdidStatus {
3064    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3065    MAV_ODID_STATUS_UNDECLARED = 0,
3066    #[doc = "The UA is on the ground."]
3067    MAV_ODID_STATUS_GROUND = 1,
3068    #[doc = "The UA is in the air."]
3069    MAV_ODID_STATUS_AIRBORNE = 2,
3070    #[doc = "The UA is having an emergency."]
3071    MAV_ODID_STATUS_EMERGENCY = 3,
3072    #[doc = "The remote ID system is failing or unreliable in some way."]
3073    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3074}
3075impl MavOdidStatus {
3076    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3077}
3078impl Default for MavOdidStatus {
3079    fn default() -> Self {
3080        Self::DEFAULT
3081    }
3082}
3083#[cfg_attr(feature = "ts", derive(TS))]
3084#[cfg_attr(feature = "ts", ts(export))]
3085#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3087#[cfg_attr(feature = "serde", serde(tag = "type"))]
3088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3089#[repr(u32)]
3090pub enum MavOdidTimeAcc {
3091    #[doc = "The timestamp accuracy is unknown."]
3092    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3093    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3094    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3095    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3096    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3097    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3098    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3099    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3100    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3101    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3102    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3103    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3104    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3105    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3106    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3107    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3108    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3109    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3110    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3111    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3112    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3113    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3114    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3115    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3116    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3117    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3118    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3119    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3120    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3121    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3122    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3123}
3124impl MavOdidTimeAcc {
3125    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3126}
3127impl Default for MavOdidTimeAcc {
3128    fn default() -> Self {
3129        Self::DEFAULT
3130    }
3131}
3132#[cfg_attr(feature = "ts", derive(TS))]
3133#[cfg_attr(feature = "ts", ts(export))]
3134#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3136#[cfg_attr(feature = "serde", serde(tag = "type"))]
3137#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3138#[repr(u32)]
3139pub enum MavOdidUaType {
3140    #[doc = "No UA (Unmanned Aircraft) type defined."]
3141    MAV_ODID_UA_TYPE_NONE = 0,
3142    #[doc = "Aeroplane/Airplane. Fixed wing."]
3143    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3144    #[doc = "Helicopter or multirotor."]
3145    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3146    #[doc = "Gyroplane."]
3147    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3148    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3149    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3150    #[doc = "Ornithopter."]
3151    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3152    #[doc = "Glider."]
3153    MAV_ODID_UA_TYPE_GLIDER = 6,
3154    #[doc = "Kite."]
3155    MAV_ODID_UA_TYPE_KITE = 7,
3156    #[doc = "Free Balloon."]
3157    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3158    #[doc = "Captive Balloon."]
3159    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3160    #[doc = "Airship. E.g. a blimp."]
3161    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3162    #[doc = "Free Fall/Parachute (unpowered)."]
3163    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3164    #[doc = "Rocket."]
3165    MAV_ODID_UA_TYPE_ROCKET = 12,
3166    #[doc = "Tethered powered aircraft."]
3167    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3168    #[doc = "Ground Obstacle."]
3169    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3170    #[doc = "Other type of aircraft not listed earlier."]
3171    MAV_ODID_UA_TYPE_OTHER = 15,
3172}
3173impl MavOdidUaType {
3174    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3175}
3176impl Default for MavOdidUaType {
3177    fn default() -> Self {
3178        Self::DEFAULT
3179    }
3180}
3181#[cfg_attr(feature = "ts", derive(TS))]
3182#[cfg_attr(feature = "ts", ts(export))]
3183#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3185#[cfg_attr(feature = "serde", serde(tag = "type"))]
3186#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3187#[repr(u32)]
3188pub enum MavOdidVerAcc {
3189    #[doc = "The vertical accuracy is unknown."]
3190    MAV_ODID_VER_ACC_UNKNOWN = 0,
3191    #[doc = "The vertical accuracy is smaller than 150 meter."]
3192    MAV_ODID_VER_ACC_150_METER = 1,
3193    #[doc = "The vertical accuracy is smaller than 45 meter."]
3194    MAV_ODID_VER_ACC_45_METER = 2,
3195    #[doc = "The vertical accuracy is smaller than 25 meter."]
3196    MAV_ODID_VER_ACC_25_METER = 3,
3197    #[doc = "The vertical accuracy is smaller than 10 meter."]
3198    MAV_ODID_VER_ACC_10_METER = 4,
3199    #[doc = "The vertical accuracy is smaller than 3 meter."]
3200    MAV_ODID_VER_ACC_3_METER = 5,
3201    #[doc = "The vertical accuracy is smaller than 1 meter."]
3202    MAV_ODID_VER_ACC_1_METER = 6,
3203}
3204impl MavOdidVerAcc {
3205    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3206}
3207impl Default for MavOdidVerAcc {
3208    fn default() -> Self {
3209        Self::DEFAULT
3210    }
3211}
3212#[cfg_attr(feature = "ts", derive(TS))]
3213#[cfg_attr(feature = "ts", ts(export))]
3214#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3216#[cfg_attr(feature = "serde", serde(tag = "type"))]
3217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3218#[repr(u32)]
3219#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3220pub enum MavParamExtType {
3221    #[doc = "8-bit unsigned integer"]
3222    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3223    #[doc = "8-bit signed integer"]
3224    MAV_PARAM_EXT_TYPE_INT8 = 2,
3225    #[doc = "16-bit unsigned integer"]
3226    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3227    #[doc = "16-bit signed integer"]
3228    MAV_PARAM_EXT_TYPE_INT16 = 4,
3229    #[doc = "32-bit unsigned integer"]
3230    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3231    #[doc = "32-bit signed integer"]
3232    MAV_PARAM_EXT_TYPE_INT32 = 6,
3233    #[doc = "64-bit unsigned integer"]
3234    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3235    #[doc = "64-bit signed integer"]
3236    MAV_PARAM_EXT_TYPE_INT64 = 8,
3237    #[doc = "32-bit floating-point"]
3238    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3239    #[doc = "64-bit floating-point"]
3240    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3241    #[doc = "Custom Type"]
3242    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3243}
3244impl MavParamExtType {
3245    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3246}
3247impl Default for MavParamExtType {
3248    fn default() -> Self {
3249        Self::DEFAULT
3250    }
3251}
3252#[cfg_attr(feature = "ts", derive(TS))]
3253#[cfg_attr(feature = "ts", ts(export))]
3254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3256#[cfg_attr(feature = "serde", serde(tag = "type"))]
3257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3258#[repr(u32)]
3259#[doc = "Specifies the datatype of a MAVLink parameter."]
3260pub enum MavParamType {
3261    #[doc = "8-bit unsigned integer"]
3262    MAV_PARAM_TYPE_UINT8 = 1,
3263    #[doc = "8-bit signed integer"]
3264    MAV_PARAM_TYPE_INT8 = 2,
3265    #[doc = "16-bit unsigned integer"]
3266    MAV_PARAM_TYPE_UINT16 = 3,
3267    #[doc = "16-bit signed integer"]
3268    MAV_PARAM_TYPE_INT16 = 4,
3269    #[doc = "32-bit unsigned integer"]
3270    MAV_PARAM_TYPE_UINT32 = 5,
3271    #[doc = "32-bit signed integer"]
3272    MAV_PARAM_TYPE_INT32 = 6,
3273    #[doc = "64-bit unsigned integer"]
3274    MAV_PARAM_TYPE_UINT64 = 7,
3275    #[doc = "64-bit signed integer"]
3276    MAV_PARAM_TYPE_INT64 = 8,
3277    #[doc = "32-bit floating-point"]
3278    MAV_PARAM_TYPE_REAL32 = 9,
3279    #[doc = "64-bit floating-point"]
3280    MAV_PARAM_TYPE_REAL64 = 10,
3281}
3282impl MavParamType {
3283    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3284}
3285impl Default for MavParamType {
3286    fn default() -> Self {
3287        Self::DEFAULT
3288    }
3289}
3290bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3291impl MavPowerStatus {
3292    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3293}
3294impl Default for MavPowerStatus {
3295    fn default() -> Self {
3296        Self::DEFAULT
3297    }
3298}
3299bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3300impl MavProtocolCapability {
3301    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3302}
3303impl Default for MavProtocolCapability {
3304    fn default() -> Self {
3305        Self::DEFAULT
3306    }
3307}
3308#[cfg_attr(feature = "ts", derive(TS))]
3309#[cfg_attr(feature = "ts", ts(export))]
3310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3312#[cfg_attr(feature = "serde", serde(tag = "type"))]
3313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3314#[repr(u32)]
3315#[doc = "Result from a MAVLink command (MAV_CMD)"]
3316pub enum MavResult {
3317    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3318    MAV_RESULT_ACCEPTED = 0,
3319    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3320    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3321    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3322    MAV_RESULT_DENIED = 2,
3323    #[doc = "Command is not supported (unknown)."]
3324    MAV_RESULT_UNSUPPORTED = 3,
3325    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3326    MAV_RESULT_FAILED = 4,
3327    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3328    MAV_RESULT_IN_PROGRESS = 5,
3329    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3330    MAV_RESULT_CANCELLED = 6,
3331    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3332    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3333    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3334    MAV_RESULT_COMMAND_INT_ONLY = 8,
3335    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3336    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3337}
3338impl MavResult {
3339    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3340}
3341impl Default for MavResult {
3342    fn default() -> Self {
3343        Self::DEFAULT
3344    }
3345}
3346#[cfg_attr(feature = "ts", derive(TS))]
3347#[cfg_attr(feature = "ts", ts(export))]
3348#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3350#[cfg_attr(feature = "serde", serde(tag = "type"))]
3351#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3352#[repr(u32)]
3353#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3354#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3355pub enum MavRoi {
3356    #[doc = "No region of interest."]
3357    MAV_ROI_NONE = 0,
3358    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3359    MAV_ROI_WPNEXT = 1,
3360    #[doc = "Point toward given waypoint."]
3361    MAV_ROI_WPINDEX = 2,
3362    #[doc = "Point toward fixed location."]
3363    MAV_ROI_LOCATION = 3,
3364    #[doc = "Point toward of given id."]
3365    MAV_ROI_TARGET = 4,
3366}
3367impl MavRoi {
3368    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3369}
3370impl Default for MavRoi {
3371    fn default() -> Self {
3372        Self::DEFAULT
3373    }
3374}
3375#[cfg_attr(feature = "ts", derive(TS))]
3376#[cfg_attr(feature = "ts", ts(export))]
3377#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3379#[cfg_attr(feature = "serde", serde(tag = "type"))]
3380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3381#[repr(u32)]
3382#[doc = "Enumeration of sensor orientation, according to its rotations"]
3383pub enum MavSensorOrientation {
3384    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3385    MAV_SENSOR_ROTATION_NONE = 0,
3386    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3387    MAV_SENSOR_ROTATION_YAW_45 = 1,
3388    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3389    MAV_SENSOR_ROTATION_YAW_90 = 2,
3390    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3391    MAV_SENSOR_ROTATION_YAW_135 = 3,
3392    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3393    MAV_SENSOR_ROTATION_YAW_180 = 4,
3394    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3395    MAV_SENSOR_ROTATION_YAW_225 = 5,
3396    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3397    MAV_SENSOR_ROTATION_YAW_270 = 6,
3398    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3399    MAV_SENSOR_ROTATION_YAW_315 = 7,
3400    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3401    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3402    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3403    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3404    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3405    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3406    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3407    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3408    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3409    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3410    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3411    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3412    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3413    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3414    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3415    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3416    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3417    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3418    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3419    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3420    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3421    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3422    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3423    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3424    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3425    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3426    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3427    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3428    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3429    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3430    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3431    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3432    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3433    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3434    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3435    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3436    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3437    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3438    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3439    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3440    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3441    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3442    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3443    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3444    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3445    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3446    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3447    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3448    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3449    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3450    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3451    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3452    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3453    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3454    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3455    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3456    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3457    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3458    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3459    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3460    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3461    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3462    #[doc = "Pitch: 315"]
3463    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3464    #[doc = "Roll: 90, Pitch: 315"]
3465    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3466    #[doc = "Custom orientation"]
3467    MAV_SENSOR_ROTATION_CUSTOM = 100,
3468}
3469impl MavSensorOrientation {
3470    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3471}
3472impl Default for MavSensorOrientation {
3473    fn default() -> Self {
3474        Self::DEFAULT
3475    }
3476}
3477#[cfg_attr(feature = "ts", derive(TS))]
3478#[cfg_attr(feature = "ts", ts(export))]
3479#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3481#[cfg_attr(feature = "serde", serde(tag = "type"))]
3482#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3483#[repr(u32)]
3484#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3485pub enum MavSeverity {
3486    #[doc = "System is unusable. This is a \"panic\" condition."]
3487    MAV_SEVERITY_EMERGENCY = 0,
3488    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3489    MAV_SEVERITY_ALERT = 1,
3490    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3491    MAV_SEVERITY_CRITICAL = 2,
3492    #[doc = "Indicates an error in secondary/redundant systems."]
3493    MAV_SEVERITY_ERROR = 3,
3494    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3495    MAV_SEVERITY_WARNING = 4,
3496    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3497    MAV_SEVERITY_NOTICE = 5,
3498    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3499    MAV_SEVERITY_INFO = 6,
3500    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3501    MAV_SEVERITY_DEBUG = 7,
3502}
3503impl MavSeverity {
3504    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3505}
3506impl Default for MavSeverity {
3507    fn default() -> Self {
3508        Self::DEFAULT
3509    }
3510}
3511#[cfg_attr(feature = "ts", derive(TS))]
3512#[cfg_attr(feature = "ts", ts(export))]
3513#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3514#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3515#[cfg_attr(feature = "serde", serde(tag = "type"))]
3516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3517#[repr(u32)]
3518#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3519pub enum MavStandardMode {
3520    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3521    MAV_STANDARD_MODE_NON_STANDARD = 0,
3522    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3523    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3524    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3525    MAV_STANDARD_MODE_ORBIT = 2,
3526    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3527    MAV_STANDARD_MODE_CRUISE = 3,
3528    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3529    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3530    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3531    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3532    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3533    MAV_STANDARD_MODE_MISSION = 6,
3534    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3535    MAV_STANDARD_MODE_LAND = 7,
3536    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3537    MAV_STANDARD_MODE_TAKEOFF = 8,
3538}
3539impl MavStandardMode {
3540    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3541}
3542impl Default for MavStandardMode {
3543    fn default() -> Self {
3544        Self::DEFAULT
3545    }
3546}
3547#[cfg_attr(feature = "ts", derive(TS))]
3548#[cfg_attr(feature = "ts", ts(export))]
3549#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3550#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3551#[cfg_attr(feature = "serde", serde(tag = "type"))]
3552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3553#[repr(u32)]
3554pub enum MavState {
3555    #[doc = "Uninitialized system, state is unknown."]
3556    MAV_STATE_UNINIT = 0,
3557    #[doc = "System is booting up."]
3558    MAV_STATE_BOOT = 1,
3559    #[doc = "System is calibrating and not flight-ready."]
3560    MAV_STATE_CALIBRATING = 2,
3561    #[doc = "System is grounded and on standby. It can be launched any time."]
3562    MAV_STATE_STANDBY = 3,
3563    #[doc = "System is active and might be already airborne. Motors are engaged."]
3564    MAV_STATE_ACTIVE = 4,
3565    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3566    MAV_STATE_CRITICAL = 5,
3567    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3568    MAV_STATE_EMERGENCY = 6,
3569    #[doc = "System just initialized its power-down sequence, will shut down now."]
3570    MAV_STATE_POWEROFF = 7,
3571    #[doc = "System is terminating itself (failsafe or commanded)."]
3572    MAV_STATE_FLIGHT_TERMINATION = 8,
3573}
3574impl MavState {
3575    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3576}
3577impl Default for MavState {
3578    fn default() -> Self {
3579        Self::DEFAULT
3580    }
3581}
3582bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3583impl MavSysStatusSensor {
3584    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3585}
3586impl Default for MavSysStatusSensor {
3587    fn default() -> Self {
3588        Self::DEFAULT
3589    }
3590}
3591bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3592impl MavSysStatusSensorExtended {
3593    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3594}
3595impl Default for MavSysStatusSensorExtended {
3596    fn default() -> Self {
3597        Self::DEFAULT
3598    }
3599}
3600#[cfg_attr(feature = "ts", derive(TS))]
3601#[cfg_attr(feature = "ts", ts(export))]
3602#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3603#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3604#[cfg_attr(feature = "serde", serde(tag = "type"))]
3605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3606#[repr(u32)]
3607pub enum MavTunnelPayloadType {
3608    #[doc = "Encoding of payload unknown."]
3609    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3610    #[doc = "Registered for STorM32 gimbal controller."]
3611    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3612    #[doc = "Registered for STorM32 gimbal controller."]
3613    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3614    #[doc = "Registered for STorM32 gimbal controller."]
3615    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3616    #[doc = "Registered for STorM32 gimbal controller."]
3617    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3618    #[doc = "Registered for STorM32 gimbal controller."]
3619    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3620    #[doc = "Registered for STorM32 gimbal controller."]
3621    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3622    #[doc = "Registered for STorM32 gimbal controller."]
3623    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3624    #[doc = "Registered for STorM32 gimbal controller."]
3625    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3626    #[doc = "Registered for STorM32 gimbal controller."]
3627    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3628    #[doc = "Registered for STorM32 gimbal controller."]
3629    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3630    #[doc = "Registered for ModalAI remote OSD protocol."]
3631    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3632    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3633    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3634    #[doc = "Registered for ModalAI vendor use."]
3635    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3636}
3637impl MavTunnelPayloadType {
3638    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3639}
3640impl Default for MavTunnelPayloadType {
3641    fn default() -> Self {
3642        Self::DEFAULT
3643    }
3644}
3645#[cfg_attr(feature = "ts", derive(TS))]
3646#[cfg_attr(feature = "ts", ts(export))]
3647#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3649#[cfg_attr(feature = "serde", serde(tag = "type"))]
3650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3651#[repr(u32)]
3652#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3653pub enum MavType {
3654    #[doc = "Generic micro air vehicle"]
3655    MAV_TYPE_GENERIC = 0,
3656    #[doc = "Fixed wing aircraft."]
3657    MAV_TYPE_FIXED_WING = 1,
3658    #[doc = "Quadrotor"]
3659    MAV_TYPE_QUADROTOR = 2,
3660    #[doc = "Coaxial helicopter"]
3661    MAV_TYPE_COAXIAL = 3,
3662    #[doc = "Normal helicopter with tail rotor."]
3663    MAV_TYPE_HELICOPTER = 4,
3664    #[doc = "Ground installation"]
3665    MAV_TYPE_ANTENNA_TRACKER = 5,
3666    #[doc = "Operator control unit / ground control station"]
3667    MAV_TYPE_GCS = 6,
3668    #[doc = "Airship, controlled"]
3669    MAV_TYPE_AIRSHIP = 7,
3670    #[doc = "Free balloon, uncontrolled"]
3671    MAV_TYPE_FREE_BALLOON = 8,
3672    #[doc = "Rocket"]
3673    MAV_TYPE_ROCKET = 9,
3674    #[doc = "Ground rover"]
3675    MAV_TYPE_GROUND_ROVER = 10,
3676    #[doc = "Surface vessel, boat, ship"]
3677    MAV_TYPE_SURFACE_BOAT = 11,
3678    #[doc = "Submarine"]
3679    MAV_TYPE_SUBMARINE = 12,
3680    #[doc = "Hexarotor"]
3681    MAV_TYPE_HEXAROTOR = 13,
3682    #[doc = "Octorotor"]
3683    MAV_TYPE_OCTOROTOR = 14,
3684    #[doc = "Tricopter"]
3685    MAV_TYPE_TRICOPTER = 15,
3686    #[doc = "Flapping wing"]
3687    MAV_TYPE_FLAPPING_WING = 16,
3688    #[doc = "Kite"]
3689    MAV_TYPE_KITE = 17,
3690    #[doc = "Onboard companion controller"]
3691    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3692    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3693    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3694    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3695    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3696    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3697    MAV_TYPE_VTOL_TILTROTOR = 21,
3698    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3699    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3700    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3701    MAV_TYPE_VTOL_TAILSITTER = 23,
3702    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3703    MAV_TYPE_VTOL_TILTWING = 24,
3704    #[doc = "VTOL reserved 5"]
3705    MAV_TYPE_VTOL_RESERVED5 = 25,
3706    #[doc = "Gimbal"]
3707    MAV_TYPE_GIMBAL = 26,
3708    #[doc = "ADSB system"]
3709    MAV_TYPE_ADSB = 27,
3710    #[doc = "Steerable, nonrigid airfoil"]
3711    MAV_TYPE_PARAFOIL = 28,
3712    #[doc = "Dodecarotor"]
3713    MAV_TYPE_DODECAROTOR = 29,
3714    #[doc = "Camera"]
3715    MAV_TYPE_CAMERA = 30,
3716    #[doc = "Charging station"]
3717    MAV_TYPE_CHARGING_STATION = 31,
3718    #[doc = "FLARM collision avoidance system"]
3719    MAV_TYPE_FLARM = 32,
3720    #[doc = "Servo"]
3721    MAV_TYPE_SERVO = 33,
3722    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3723    MAV_TYPE_ODID = 34,
3724    #[doc = "Decarotor"]
3725    MAV_TYPE_DECAROTOR = 35,
3726    #[doc = "Battery"]
3727    MAV_TYPE_BATTERY = 36,
3728    #[doc = "Parachute"]
3729    MAV_TYPE_PARACHUTE = 37,
3730    #[doc = "Log"]
3731    MAV_TYPE_LOG = 38,
3732    #[doc = "OSD"]
3733    MAV_TYPE_OSD = 39,
3734    #[doc = "IMU"]
3735    MAV_TYPE_IMU = 40,
3736    #[doc = "GPS"]
3737    MAV_TYPE_GPS = 41,
3738    #[doc = "Winch"]
3739    MAV_TYPE_WINCH = 42,
3740    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3741    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3742    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3743    MAV_TYPE_ILLUMINATOR = 44,
3744    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3745    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3746}
3747impl MavType {
3748    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3749}
3750impl Default for MavType {
3751    fn default() -> Self {
3752        Self::DEFAULT
3753    }
3754}
3755#[cfg_attr(feature = "ts", derive(TS))]
3756#[cfg_attr(feature = "ts", ts(export))]
3757#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3759#[cfg_attr(feature = "serde", serde(tag = "type"))]
3760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3761#[repr(u32)]
3762#[doc = "Enumeration of VTOL states"]
3763pub enum MavVtolState {
3764    #[doc = "MAV is not configured as VTOL"]
3765    MAV_VTOL_STATE_UNDEFINED = 0,
3766    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3767    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3768    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3769    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3770    #[doc = "VTOL is in multicopter state"]
3771    MAV_VTOL_STATE_MC = 3,
3772    #[doc = "VTOL is in fixed-wing state"]
3773    MAV_VTOL_STATE_FW = 4,
3774}
3775impl MavVtolState {
3776    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3777}
3778impl Default for MavVtolState {
3779    fn default() -> Self {
3780        Self::DEFAULT
3781    }
3782}
3783bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3784impl MavWinchStatusFlag {
3785    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3786}
3787impl Default for MavWinchStatusFlag {
3788    fn default() -> Self {
3789        Self::DEFAULT
3790    }
3791}
3792#[cfg_attr(feature = "ts", derive(TS))]
3793#[cfg_attr(feature = "ts", ts(export))]
3794#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3796#[cfg_attr(feature = "serde", serde(tag = "type"))]
3797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3798#[repr(u32)]
3799pub enum MavlinkDataStreamType {
3800    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3801    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3802    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3803    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3804    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3805    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3806}
3807impl MavlinkDataStreamType {
3808    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3809}
3810impl Default for MavlinkDataStreamType {
3811    fn default() -> Self {
3812        Self::DEFAULT
3813    }
3814}
3815#[cfg_attr(feature = "ts", derive(TS))]
3816#[cfg_attr(feature = "ts", ts(export))]
3817#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3819#[cfg_attr(feature = "serde", serde(tag = "type"))]
3820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3821#[repr(u32)]
3822#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3823pub enum MissionState {
3824    #[doc = "The mission status reporting is not supported."]
3825    MISSION_STATE_UNKNOWN = 0,
3826    #[doc = "No mission on the vehicle."]
3827    MISSION_STATE_NO_MISSION = 1,
3828    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3829    MISSION_STATE_NOT_STARTED = 2,
3830    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3831    MISSION_STATE_ACTIVE = 3,
3832    #[doc = "Mission is paused when in auto mode."]
3833    MISSION_STATE_PAUSED = 4,
3834    #[doc = "Mission has executed all mission items."]
3835    MISSION_STATE_COMPLETE = 5,
3836}
3837impl MissionState {
3838    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3839}
3840impl Default for MissionState {
3841    fn default() -> Self {
3842        Self::DEFAULT
3843    }
3844}
3845#[cfg_attr(feature = "ts", derive(TS))]
3846#[cfg_attr(feature = "ts", ts(export))]
3847#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3849#[cfg_attr(feature = "serde", serde(tag = "type"))]
3850#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3851#[repr(u32)]
3852#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3853pub enum MotorTestOrder {
3854    #[doc = "Default autopilot motor test method."]
3855    MOTOR_TEST_ORDER_DEFAULT = 0,
3856    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3857    MOTOR_TEST_ORDER_SEQUENCE = 1,
3858    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3859    MOTOR_TEST_ORDER_BOARD = 2,
3860}
3861impl MotorTestOrder {
3862    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3863}
3864impl Default for MotorTestOrder {
3865    fn default() -> Self {
3866        Self::DEFAULT
3867    }
3868}
3869#[cfg_attr(feature = "ts", derive(TS))]
3870#[cfg_attr(feature = "ts", ts(export))]
3871#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3873#[cfg_attr(feature = "serde", serde(tag = "type"))]
3874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3875#[repr(u32)]
3876#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3877pub enum MotorTestThrottleType {
3878    #[doc = "Throttle as a percentage (0 ~ 100)"]
3879    MOTOR_TEST_THROTTLE_PERCENT = 0,
3880    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3881    MOTOR_TEST_THROTTLE_PWM = 1,
3882    #[doc = "Throttle pass-through from pilot's transmitter."]
3883    MOTOR_TEST_THROTTLE_PILOT = 2,
3884    #[doc = "Per-motor compass calibration test."]
3885    MOTOR_TEST_COMPASS_CAL = 3,
3886}
3887impl MotorTestThrottleType {
3888    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3889}
3890impl Default for MotorTestThrottleType {
3891    fn default() -> Self {
3892        Self::DEFAULT
3893    }
3894}
3895#[cfg_attr(feature = "ts", derive(TS))]
3896#[cfg_attr(feature = "ts", ts(export))]
3897#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3899#[cfg_attr(feature = "serde", serde(tag = "type"))]
3900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3901#[repr(u32)]
3902pub enum NavVtolLandOptions {
3903    #[doc = "Default autopilot landing behaviour."]
3904    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3905    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3906    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3907    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3908    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3909}
3910impl NavVtolLandOptions {
3911    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3912}
3913impl Default for NavVtolLandOptions {
3914    fn default() -> Self {
3915        Self::DEFAULT
3916    }
3917}
3918#[cfg_attr(feature = "ts", derive(TS))]
3919#[cfg_attr(feature = "ts", ts(export))]
3920#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3922#[cfg_attr(feature = "serde", serde(tag = "type"))]
3923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3924#[repr(u32)]
3925#[doc = "Yaw behaviour during orbit flight."]
3926pub enum OrbitYawBehaviour {
3927    #[doc = "Vehicle front points to the center (default)."]
3928    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3929    #[doc = "Vehicle front holds heading when message received."]
3930    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3931    #[doc = "Yaw uncontrolled."]
3932    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3933    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3934    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3935    #[doc = "Yaw controlled by RC input."]
3936    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3937    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3938    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3939}
3940impl OrbitYawBehaviour {
3941    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3942}
3943impl Default for OrbitYawBehaviour {
3944    fn default() -> Self {
3945        Self::DEFAULT
3946    }
3947}
3948#[cfg_attr(feature = "ts", derive(TS))]
3949#[cfg_attr(feature = "ts", ts(export))]
3950#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3952#[cfg_attr(feature = "serde", serde(tag = "type"))]
3953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3954#[repr(u32)]
3955#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3956pub enum ParachuteAction {
3957    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3958    PARACHUTE_DISABLE = 0,
3959    #[doc = "Enable auto-release of parachute."]
3960    PARACHUTE_ENABLE = 1,
3961    #[doc = "Release parachute and kill motors."]
3962    PARACHUTE_RELEASE = 2,
3963}
3964impl ParachuteAction {
3965    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3966}
3967impl Default for ParachuteAction {
3968    fn default() -> Self {
3969        Self::DEFAULT
3970    }
3971}
3972#[cfg_attr(feature = "ts", derive(TS))]
3973#[cfg_attr(feature = "ts", ts(export))]
3974#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3976#[cfg_attr(feature = "serde", serde(tag = "type"))]
3977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3978#[repr(u32)]
3979#[doc = "Result from PARAM_EXT_SET message."]
3980pub enum ParamAck {
3981    #[doc = "Parameter value ACCEPTED and SET"]
3982    PARAM_ACK_ACCEPTED = 0,
3983    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3984    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3985    #[doc = "Parameter failed to set"]
3986    PARAM_ACK_FAILED = 2,
3987    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3988    PARAM_ACK_IN_PROGRESS = 3,
3989}
3990impl ParamAck {
3991    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3992}
3993impl Default for ParamAck {
3994    fn default() -> Self {
3995        Self::DEFAULT
3996    }
3997}
3998bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3999impl PositionTargetTypemask {
4000    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4001}
4002impl Default for PositionTargetTypemask {
4003    fn default() -> Self {
4004        Self::DEFAULT
4005    }
4006}
4007#[cfg_attr(feature = "ts", derive(TS))]
4008#[cfg_attr(feature = "ts", ts(export))]
4009#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4011#[cfg_attr(feature = "serde", serde(tag = "type"))]
4012#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4013#[repr(u32)]
4014#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4015pub enum PrecisionLandMode {
4016    #[doc = "Normal (non-precision) landing."]
4017    PRECISION_LAND_MODE_DISABLED = 0,
4018    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4019    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4020    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4021    PRECISION_LAND_MODE_REQUIRED = 2,
4022}
4023impl PrecisionLandMode {
4024    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4025}
4026impl Default for PrecisionLandMode {
4027    fn default() -> Self {
4028        Self::DEFAULT
4029    }
4030}
4031#[cfg_attr(feature = "ts", derive(TS))]
4032#[cfg_attr(feature = "ts", ts(export))]
4033#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4035#[cfg_attr(feature = "serde", serde(tag = "type"))]
4036#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4037#[repr(u32)]
4038#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4039pub enum PreflightStorageMissionAction {
4040    #[doc = "Read current mission data from persistent storage"]
4041    MISSION_READ_PERSISTENT = 0,
4042    #[doc = "Write current mission data to persistent storage"]
4043    MISSION_WRITE_PERSISTENT = 1,
4044    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4045    MISSION_RESET_DEFAULT = 2,
4046}
4047impl PreflightStorageMissionAction {
4048    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4049}
4050impl Default for PreflightStorageMissionAction {
4051    fn default() -> Self {
4052        Self::DEFAULT
4053    }
4054}
4055#[cfg_attr(feature = "ts", derive(TS))]
4056#[cfg_attr(feature = "ts", ts(export))]
4057#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4059#[cfg_attr(feature = "serde", serde(tag = "type"))]
4060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4061#[repr(u32)]
4062#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4063pub enum PreflightStorageParameterAction {
4064    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4065    PARAM_READ_PERSISTENT = 0,
4066    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4067    PARAM_WRITE_PERSISTENT = 1,
4068    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4069    PARAM_RESET_CONFIG_DEFAULT = 2,
4070    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4071    PARAM_RESET_SENSOR_DEFAULT = 3,
4072    #[doc = "Reset all parameters, including operation counters, to default values"]
4073    PARAM_RESET_ALL_DEFAULT = 4,
4074}
4075impl PreflightStorageParameterAction {
4076    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4077}
4078impl Default for PreflightStorageParameterAction {
4079    fn default() -> Self {
4080        Self::DEFAULT
4081    }
4082}
4083#[cfg_attr(feature = "ts", derive(TS))]
4084#[cfg_attr(feature = "ts", ts(export))]
4085#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4087#[cfg_attr(feature = "serde", serde(tag = "type"))]
4088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4089#[repr(u32)]
4090#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4091pub enum RcSubType {
4092    #[doc = "Spektrum DSM2"]
4093    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4094    #[doc = "Spektrum DSMX"]
4095    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4096    #[doc = "Spektrum DSMX8"]
4097    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4098}
4099impl RcSubType {
4100    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4101}
4102impl Default for RcSubType {
4103    fn default() -> Self {
4104        Self::DEFAULT
4105    }
4106}
4107#[cfg_attr(feature = "ts", derive(TS))]
4108#[cfg_attr(feature = "ts", ts(export))]
4109#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4111#[cfg_attr(feature = "serde", serde(tag = "type"))]
4112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4113#[repr(u32)]
4114#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4115pub enum RcType {
4116    #[doc = "Spektrum"]
4117    RC_TYPE_SPEKTRUM = 0,
4118    #[doc = "CRSF"]
4119    RC_TYPE_CRSF = 1,
4120}
4121impl RcType {
4122    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4123}
4124impl Default for RcType {
4125    fn default() -> Self {
4126        Self::DEFAULT
4127    }
4128}
4129#[cfg_attr(feature = "ts", derive(TS))]
4130#[cfg_attr(feature = "ts", ts(export))]
4131#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4133#[cfg_attr(feature = "serde", serde(tag = "type"))]
4134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4135#[repr(u32)]
4136#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4137pub enum RebootShutdownConditions {
4138    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4139    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4140    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4141    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4142}
4143impl RebootShutdownConditions {
4144    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4145}
4146impl Default for RebootShutdownConditions {
4147    fn default() -> Self {
4148        Self::DEFAULT
4149    }
4150}
4151#[cfg_attr(feature = "ts", derive(TS))]
4152#[cfg_attr(feature = "ts", ts(export))]
4153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4155#[cfg_attr(feature = "serde", serde(tag = "type"))]
4156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4157#[repr(u32)]
4158#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4159pub enum RtkBaselineCoordinateSystem {
4160    #[doc = "Earth-centered, Earth-fixed"]
4161    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4162    #[doc = "RTK basestation centered, north, east, down"]
4163    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4164}
4165impl RtkBaselineCoordinateSystem {
4166    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4167}
4168impl Default for RtkBaselineCoordinateSystem {
4169    fn default() -> Self {
4170        Self::DEFAULT
4171    }
4172}
4173#[cfg_attr(feature = "ts", derive(TS))]
4174#[cfg_attr(feature = "ts", ts(export))]
4175#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4176#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4177#[cfg_attr(feature = "serde", serde(tag = "type"))]
4178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4179#[repr(u32)]
4180#[doc = "Possible safety switch states."]
4181pub enum SafetySwitchState {
4182    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4183    SAFETY_SWITCH_STATE_SAFE = 0,
4184    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4185    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4186}
4187impl SafetySwitchState {
4188    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4189}
4190impl Default for SafetySwitchState {
4191    fn default() -> Self {
4192        Self::DEFAULT
4193    }
4194}
4195#[cfg_attr(feature = "ts", derive(TS))]
4196#[cfg_attr(feature = "ts", ts(export))]
4197#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4199#[cfg_attr(feature = "serde", serde(tag = "type"))]
4200#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4201#[repr(u32)]
4202#[doc = "SERIAL_CONTROL device types"]
4203pub enum SerialControlDev {
4204    #[doc = "First telemetry port"]
4205    SERIAL_CONTROL_DEV_TELEM1 = 0,
4206    #[doc = "Second telemetry port"]
4207    SERIAL_CONTROL_DEV_TELEM2 = 1,
4208    #[doc = "First GPS port"]
4209    SERIAL_CONTROL_DEV_GPS1 = 2,
4210    #[doc = "Second GPS port"]
4211    SERIAL_CONTROL_DEV_GPS2 = 3,
4212    #[doc = "system shell"]
4213    SERIAL_CONTROL_DEV_SHELL = 10,
4214    #[doc = "SERIAL0"]
4215    SERIAL_CONTROL_SERIAL0 = 100,
4216    #[doc = "SERIAL1"]
4217    SERIAL_CONTROL_SERIAL1 = 101,
4218    #[doc = "SERIAL2"]
4219    SERIAL_CONTROL_SERIAL2 = 102,
4220    #[doc = "SERIAL3"]
4221    SERIAL_CONTROL_SERIAL3 = 103,
4222    #[doc = "SERIAL4"]
4223    SERIAL_CONTROL_SERIAL4 = 104,
4224    #[doc = "SERIAL5"]
4225    SERIAL_CONTROL_SERIAL5 = 105,
4226    #[doc = "SERIAL6"]
4227    SERIAL_CONTROL_SERIAL6 = 106,
4228    #[doc = "SERIAL7"]
4229    SERIAL_CONTROL_SERIAL7 = 107,
4230    #[doc = "SERIAL8"]
4231    SERIAL_CONTROL_SERIAL8 = 108,
4232    #[doc = "SERIAL9"]
4233    SERIAL_CONTROL_SERIAL9 = 109,
4234}
4235impl SerialControlDev {
4236    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4237}
4238impl Default for SerialControlDev {
4239    fn default() -> Self {
4240        Self::DEFAULT
4241    }
4242}
4243bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4244impl SerialControlFlag {
4245    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4246}
4247impl Default for SerialControlFlag {
4248    fn default() -> Self {
4249        Self::DEFAULT
4250    }
4251}
4252#[cfg_attr(feature = "ts", derive(TS))]
4253#[cfg_attr(feature = "ts", ts(export))]
4254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4256#[cfg_attr(feature = "serde", serde(tag = "type"))]
4257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4258#[repr(u32)]
4259#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4260pub enum SetFocusType {
4261    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4262    FOCUS_TYPE_STEP = 0,
4263    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4264    FOCUS_TYPE_CONTINUOUS = 1,
4265    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4266    FOCUS_TYPE_RANGE = 2,
4267    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4268    FOCUS_TYPE_METERS = 3,
4269    #[doc = "Focus automatically."]
4270    FOCUS_TYPE_AUTO = 4,
4271    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4272    FOCUS_TYPE_AUTO_SINGLE = 5,
4273    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4274    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4275}
4276impl SetFocusType {
4277    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4278}
4279impl Default for SetFocusType {
4280    fn default() -> Self {
4281        Self::DEFAULT
4282    }
4283}
4284#[cfg_attr(feature = "ts", derive(TS))]
4285#[cfg_attr(feature = "ts", ts(export))]
4286#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4287#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4288#[cfg_attr(feature = "serde", serde(tag = "type"))]
4289#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4290#[repr(u32)]
4291#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4292pub enum SpeedType {
4293    #[doc = "Airspeed"]
4294    SPEED_TYPE_AIRSPEED = 0,
4295    #[doc = "Groundspeed"]
4296    SPEED_TYPE_GROUNDSPEED = 1,
4297    #[doc = "Climb speed"]
4298    SPEED_TYPE_CLIMB_SPEED = 2,
4299    #[doc = "Descent speed"]
4300    SPEED_TYPE_DESCENT_SPEED = 3,
4301}
4302impl SpeedType {
4303    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4304}
4305impl Default for SpeedType {
4306    fn default() -> Self {
4307        Self::DEFAULT
4308    }
4309}
4310#[cfg_attr(feature = "ts", derive(TS))]
4311#[cfg_attr(feature = "ts", ts(export))]
4312#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4314#[cfg_attr(feature = "serde", serde(tag = "type"))]
4315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4316#[repr(u32)]
4317#[doc = "Flags to indicate the status of camera storage."]
4318pub enum StorageStatus {
4319    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4320    STORAGE_STATUS_EMPTY = 0,
4321    #[doc = "Storage present but unformatted."]
4322    STORAGE_STATUS_UNFORMATTED = 1,
4323    #[doc = "Storage present and ready."]
4324    STORAGE_STATUS_READY = 2,
4325    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4326    STORAGE_STATUS_NOT_SUPPORTED = 3,
4327}
4328impl StorageStatus {
4329    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4330}
4331impl Default for StorageStatus {
4332    fn default() -> Self {
4333        Self::DEFAULT
4334    }
4335}
4336#[cfg_attr(feature = "ts", derive(TS))]
4337#[cfg_attr(feature = "ts", ts(export))]
4338#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4340#[cfg_attr(feature = "serde", serde(tag = "type"))]
4341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4342#[repr(u32)]
4343#[doc = "Flags to indicate the type of storage."]
4344pub enum StorageType {
4345    #[doc = "Storage type is not known."]
4346    STORAGE_TYPE_UNKNOWN = 0,
4347    #[doc = "Storage type is USB device."]
4348    STORAGE_TYPE_USB_STICK = 1,
4349    #[doc = "Storage type is SD card."]
4350    STORAGE_TYPE_SD = 2,
4351    #[doc = "Storage type is microSD card."]
4352    STORAGE_TYPE_MICROSD = 3,
4353    #[doc = "Storage type is CFast."]
4354    STORAGE_TYPE_CF = 4,
4355    #[doc = "Storage type is CFexpress."]
4356    STORAGE_TYPE_CFE = 5,
4357    #[doc = "Storage type is XQD."]
4358    STORAGE_TYPE_XQD = 6,
4359    #[doc = "Storage type is HD mass storage type."]
4360    STORAGE_TYPE_HD = 7,
4361    #[doc = "Storage type is other, not listed type."]
4362    STORAGE_TYPE_OTHER = 254,
4363}
4364impl StorageType {
4365    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4366}
4367impl Default for StorageType {
4368    fn default() -> Self {
4369        Self::DEFAULT
4370    }
4371}
4372bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4373impl StorageUsageFlag {
4374    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4375}
4376impl Default for StorageUsageFlag {
4377    fn default() -> Self {
4378        Self::DEFAULT
4379    }
4380}
4381#[cfg_attr(feature = "ts", derive(TS))]
4382#[cfg_attr(feature = "ts", ts(export))]
4383#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4385#[cfg_attr(feature = "serde", serde(tag = "type"))]
4386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4387#[repr(u32)]
4388#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4389pub enum TuneFormat {
4390    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4391    TUNE_FORMAT_QBASIC1_1 = 1,
4392    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4393    TUNE_FORMAT_MML_MODERN = 2,
4394}
4395impl TuneFormat {
4396    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4397}
4398impl Default for TuneFormat {
4399    fn default() -> Self {
4400        Self::DEFAULT
4401    }
4402}
4403#[cfg_attr(feature = "ts", derive(TS))]
4404#[cfg_attr(feature = "ts", ts(export))]
4405#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4407#[cfg_attr(feature = "serde", serde(tag = "type"))]
4408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4409#[repr(u32)]
4410#[doc = "Generalized UAVCAN node health"]
4411pub enum UavcanNodeHealth {
4412    #[doc = "The node is functioning properly."]
4413    UAVCAN_NODE_HEALTH_OK = 0,
4414    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4415    UAVCAN_NODE_HEALTH_WARNING = 1,
4416    #[doc = "The node has encountered a major failure."]
4417    UAVCAN_NODE_HEALTH_ERROR = 2,
4418    #[doc = "The node has suffered a fatal malfunction."]
4419    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4420}
4421impl UavcanNodeHealth {
4422    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4423}
4424impl Default for UavcanNodeHealth {
4425    fn default() -> Self {
4426        Self::DEFAULT
4427    }
4428}
4429#[cfg_attr(feature = "ts", derive(TS))]
4430#[cfg_attr(feature = "ts", ts(export))]
4431#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4433#[cfg_attr(feature = "serde", serde(tag = "type"))]
4434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4435#[repr(u32)]
4436#[doc = "Generalized UAVCAN node mode"]
4437pub enum UavcanNodeMode {
4438    #[doc = "The node is performing its primary functions."]
4439    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4440    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4441    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4442    #[doc = "The node is under maintenance."]
4443    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4444    #[doc = "The node is in the process of updating its software."]
4445    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4446    #[doc = "The node is no longer available online."]
4447    UAVCAN_NODE_MODE_OFFLINE = 7,
4448}
4449impl UavcanNodeMode {
4450    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4451}
4452impl Default for UavcanNodeMode {
4453    fn default() -> Self {
4454        Self::DEFAULT
4455    }
4456}
4457#[cfg_attr(feature = "ts", derive(TS))]
4458#[cfg_attr(feature = "ts", ts(export))]
4459#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4460#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4461#[cfg_attr(feature = "serde", serde(tag = "type"))]
4462#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4463#[repr(u32)]
4464#[doc = "Emergency status encoding"]
4465pub enum UavionixAdsbEmergencyStatus {
4466    UAVIONIX_ADSB_OUT_NO_EMERGENCY = 0,
4467    UAVIONIX_ADSB_OUT_GENERAL_EMERGENCY = 1,
4468    UAVIONIX_ADSB_OUT_LIFEGUARD_EMERGENCY = 2,
4469    UAVIONIX_ADSB_OUT_MINIMUM_FUEL_EMERGENCY = 3,
4470    UAVIONIX_ADSB_OUT_NO_COMM_EMERGENCY = 4,
4471    UAVIONIX_ADSB_OUT_UNLAWFUL_INTERFERANCE_EMERGENCY = 5,
4472    UAVIONIX_ADSB_OUT_DOWNED_AIRCRAFT_EMERGENCY = 6,
4473    UAVIONIX_ADSB_OUT_RESERVED = 7,
4474}
4475impl UavionixAdsbEmergencyStatus {
4476    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_NO_EMERGENCY;
4477}
4478impl Default for UavionixAdsbEmergencyStatus {
4479    fn default() -> Self {
4480        Self::DEFAULT
4481    }
4482}
4483#[cfg_attr(feature = "ts", derive(TS))]
4484#[cfg_attr(feature = "ts", ts(export))]
4485#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4487#[cfg_attr(feature = "serde", serde(tag = "type"))]
4488#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4489#[repr(u32)]
4490#[doc = "Definitions for aircraft size"]
4491pub enum UavionixAdsbOutCfgAircraftSize {
4492    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_NO_DATA = 0,
4493    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L15M_W23M = 1,
4494    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L25M_W28P5M = 2,
4495    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L25_34M = 3,
4496    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L35_33M = 4,
4497    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L35_38M = 5,
4498    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L45_39P5M = 6,
4499    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L45_45M = 7,
4500    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L55_45M = 8,
4501    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L55_52M = 9,
4502    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L65_59P5M = 10,
4503    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L65_67M = 11,
4504    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L75_W72P5M = 12,
4505    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L75_W80M = 13,
4506    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L85_W80M = 14,
4507    UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_L85_W90M = 15,
4508}
4509impl UavionixAdsbOutCfgAircraftSize {
4510    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CFG_AIRCRAFT_SIZE_NO_DATA;
4511}
4512impl Default for UavionixAdsbOutCfgAircraftSize {
4513    fn default() -> Self {
4514        Self::DEFAULT
4515    }
4516}
4517#[cfg_attr(feature = "ts", derive(TS))]
4518#[cfg_attr(feature = "ts", ts(export))]
4519#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4521#[cfg_attr(feature = "serde", serde(tag = "type"))]
4522#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4523#[repr(u32)]
4524#[doc = "GPS lataral offset encoding"]
4525pub enum UavionixAdsbOutCfgGpsOffsetLat {
4526    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_NO_DATA = 0,
4527    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_LEFT_2M = 1,
4528    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_LEFT_4M = 2,
4529    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_LEFT_6M = 3,
4530    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_0M = 4,
4531    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_2M = 5,
4532    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_4M = 6,
4533    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_RIGHT_6M = 7,
4534}
4535impl UavionixAdsbOutCfgGpsOffsetLat {
4536    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LAT_NO_DATA;
4537}
4538impl Default for UavionixAdsbOutCfgGpsOffsetLat {
4539    fn default() -> Self {
4540        Self::DEFAULT
4541    }
4542}
4543#[cfg_attr(feature = "ts", derive(TS))]
4544#[cfg_attr(feature = "ts", ts(export))]
4545#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4547#[cfg_attr(feature = "serde", serde(tag = "type"))]
4548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4549#[repr(u32)]
4550#[doc = "GPS longitudinal offset encoding"]
4551pub enum UavionixAdsbOutCfgGpsOffsetLon {
4552    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON_NO_DATA = 0,
4553    UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON_APPLIED_BY_SENSOR = 1,
4554}
4555impl UavionixAdsbOutCfgGpsOffsetLon {
4556    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CFG_GPS_OFFSET_LON_NO_DATA;
4557}
4558impl Default for UavionixAdsbOutCfgGpsOffsetLon {
4559    fn default() -> Self {
4560        Self::DEFAULT
4561    }
4562}
4563bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder dynamic report"] pub struct UavionixAdsbOutControlState : u8 { const UAVIONIX_ADSB_OUT_CONTROL_STATE_EXTERNAL_BARO_CROSSCHECKED = 1 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_ON_GROUND = 4 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_IDENT_BUTTON_ACTIVE = 8 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_MODE_A_ENABLED = 16 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_MODE_C_ENABLED = 32 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_MODE_S_ENABLED = 64 ; const UAVIONIX_ADSB_OUT_CONTROL_STATE_1090ES_TX_ENABLED = 128 ; } }
4564impl UavionixAdsbOutControlState {
4565    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_CONTROL_STATE_EXTERNAL_BARO_CROSSCHECKED;
4566}
4567impl Default for UavionixAdsbOutControlState {
4568    fn default() -> Self {
4569        Self::DEFAULT
4570    }
4571}
4572#[cfg_attr(feature = "ts", derive(TS))]
4573#[cfg_attr(feature = "ts", ts(export))]
4574#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4575#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4576#[cfg_attr(feature = "serde", serde(tag = "type"))]
4577#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4578#[repr(u32)]
4579#[doc = "Status for ADS-B transponder dynamic input"]
4580pub enum UavionixAdsbOutDynamicGpsFix {
4581    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_NONE_0 = 0,
4582    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_NONE_1 = 1,
4583    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_2D = 2,
4584    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_3D = 3,
4585    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_DGPS = 4,
4586    UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_RTK = 5,
4587}
4588impl UavionixAdsbOutDynamicGpsFix {
4589    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_DYNAMIC_GPS_FIX_NONE_0;
4590}
4591impl Default for UavionixAdsbOutDynamicGpsFix {
4592    fn default() -> Self {
4593        Self::DEFAULT
4594    }
4595}
4596bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder dynamic report"] pub struct UavionixAdsbOutDynamicState : u16 { const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_INTENT_CHANGE = 1 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_AUTOPILOT_ENABLED = 2 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_NICBARO_CROSSCHECKED = 4 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_ON_GROUND = 8 ; const UAVIONIX_ADSB_OUT_DYNAMIC_STATE_IDENT = 16 ; } }
4597impl UavionixAdsbOutDynamicState {
4598    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_DYNAMIC_STATE_INTENT_CHANGE;
4599}
4600impl Default for UavionixAdsbOutDynamicState {
4601    fn default() -> Self {
4602        Self::DEFAULT
4603    }
4604}
4605bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Transceiver RF control flags for ADS-B transponder dynamic reports"] pub struct UavionixAdsbOutRfSelect : u8 { const UAVIONIX_ADSB_OUT_RF_SELECT_RX_ENABLED = 1 ; const UAVIONIX_ADSB_OUT_RF_SELECT_TX_ENABLED = 2 ; } }
4606impl UavionixAdsbOutRfSelect {
4607    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_RF_SELECT_RX_ENABLED;
4608}
4609impl Default for UavionixAdsbOutRfSelect {
4610    fn default() -> Self {
4611        Self::DEFAULT
4612    }
4613}
4614bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder fault report"] pub struct UavionixAdsbOutStatusFault : u8 { const UAVIONIX_ADSB_OUT_STATUS_FAULT_STATUS_MESSAGE_UNAVAIL = 8 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_GPS_NO_POS = 16 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_GPS_UNAVAIL = 32 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_TX_SYSTEM_FAIL = 64 ; const UAVIONIX_ADSB_OUT_STATUS_FAULT_MAINT_REQ = 128 ; } }
4615impl UavionixAdsbOutStatusFault {
4616    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_STATUS_FAULT_STATUS_MESSAGE_UNAVAIL;
4617}
4618impl Default for UavionixAdsbOutStatusFault {
4619    fn default() -> Self {
4620        Self::DEFAULT
4621    }
4622}
4623#[cfg_attr(feature = "ts", derive(TS))]
4624#[cfg_attr(feature = "ts", ts(export))]
4625#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4626#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4627#[cfg_attr(feature = "serde", serde(tag = "type"))]
4628#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4629#[repr(u32)]
4630#[doc = "State flags for ADS-B transponder status report"]
4631pub enum UavionixAdsbOutStatusNicNacp {
4632    UAVIONIX_ADSB_NIC_CR_20_NM = 1,
4633    UAVIONIX_ADSB_NIC_CR_8_NM = 2,
4634    UAVIONIX_ADSB_NIC_CR_4_NM = 3,
4635    UAVIONIX_ADSB_NIC_CR_2_NM = 4,
4636    UAVIONIX_ADSB_NIC_CR_1_NM = 5,
4637    UAVIONIX_ADSB_NIC_CR_0_3_NM = 6,
4638    UAVIONIX_ADSB_NIC_CR_0_2_NM = 7,
4639    UAVIONIX_ADSB_NIC_CR_0_1_NM = 8,
4640    UAVIONIX_ADSB_NIC_CR_75_M = 9,
4641    UAVIONIX_ADSB_NIC_CR_25_M = 10,
4642    UAVIONIX_ADSB_NIC_CR_7_5_M = 11,
4643    UAVIONIX_ADSB_NACP_EPU_10_NM = 16,
4644    UAVIONIX_ADSB_NACP_EPU_4_NM = 32,
4645    UAVIONIX_ADSB_NACP_EPU_2_NM = 48,
4646    UAVIONIX_ADSB_NACP_EPU_1_NM = 64,
4647    UAVIONIX_ADSB_NACP_EPU_0_5_NM = 80,
4648    UAVIONIX_ADSB_NACP_EPU_0_3_NM = 96,
4649    UAVIONIX_ADSB_NACP_EPU_0_1_NM = 112,
4650    UAVIONIX_ADSB_NACP_EPU_0_05_NM = 128,
4651    UAVIONIX_ADSB_NACP_EPU_30_M = 144,
4652    UAVIONIX_ADSB_NACP_EPU_10_M = 160,
4653    UAVIONIX_ADSB_NACP_EPU_3_M = 176,
4654}
4655impl UavionixAdsbOutStatusNicNacp {
4656    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_NIC_CR_20_NM;
4657}
4658impl Default for UavionixAdsbOutStatusNicNacp {
4659    fn default() -> Self {
4660        Self::DEFAULT
4661    }
4662}
4663bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for ADS-B transponder status report"] pub struct UavionixAdsbOutStatusState : u8 { const UAVIONIX_ADSB_OUT_STATUS_STATE_ON_GROUND = 1 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_INTERROGATED_SINCE_LAST = 2 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_XBIT_ENABLED = 4 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_IDENT_ACTIVE = 8 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_MODE_A_ENABLED = 16 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_MODE_C_ENABLED = 32 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_MODE_S_ENABLED = 64 ; const UAVIONIX_ADSB_OUT_STATUS_STATE_1090ES_TX_ENABLED = 128 ; } }
4664impl UavionixAdsbOutStatusState {
4665    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_OUT_STATUS_STATE_ON_GROUND;
4666}
4667impl Default for UavionixAdsbOutStatusState {
4668    fn default() -> Self {
4669        Self::DEFAULT
4670    }
4671}
4672bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Status flags for ADS-B transponder dynamic output"] pub struct UavionixAdsbRfHealth : u8 { const UAVIONIX_ADSB_RF_HEALTH_OK = 1 ; const UAVIONIX_ADSB_RF_HEALTH_FAIL_TX = 2 ; const UAVIONIX_ADSB_RF_HEALTH_FAIL_RX = 16 ; } }
4673impl UavionixAdsbRfHealth {
4674    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_RF_HEALTH_OK;
4675}
4676impl Default for UavionixAdsbRfHealth {
4677    fn default() -> Self {
4678        Self::DEFAULT
4679    }
4680}
4681bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "State flags for X-Bit and reserved fields."] pub struct UavionixAdsbXbit : u8 { const UAVIONIX_ADSB_XBIT_ENABLED = 128 ; } }
4682impl UavionixAdsbXbit {
4683    pub const DEFAULT: Self = Self::UAVIONIX_ADSB_XBIT_ENABLED;
4684}
4685impl Default for UavionixAdsbXbit {
4686    fn default() -> Self {
4687        Self::DEFAULT
4688    }
4689}
4690bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4691impl UtmDataAvailFlags {
4692    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4693}
4694impl Default for UtmDataAvailFlags {
4695    fn default() -> Self {
4696        Self::DEFAULT
4697    }
4698}
4699#[cfg_attr(feature = "ts", derive(TS))]
4700#[cfg_attr(feature = "ts", ts(export))]
4701#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4702#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4703#[cfg_attr(feature = "serde", serde(tag = "type"))]
4704#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4705#[repr(u32)]
4706#[doc = "Airborne status of UAS."]
4707pub enum UtmFlightState {
4708    #[doc = "The flight state can't be determined."]
4709    UTM_FLIGHT_STATE_UNKNOWN = 1,
4710    #[doc = "UAS on ground."]
4711    UTM_FLIGHT_STATE_GROUND = 2,
4712    #[doc = "UAS airborne."]
4713    UTM_FLIGHT_STATE_AIRBORNE = 3,
4714    #[doc = "UAS is in an emergency flight state."]
4715    UTM_FLIGHT_STATE_EMERGENCY = 16,
4716    #[doc = "UAS has no active controls."]
4717    UTM_FLIGHT_STATE_NOCTRL = 32,
4718}
4719impl UtmFlightState {
4720    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4721}
4722impl Default for UtmFlightState {
4723    fn default() -> Self {
4724        Self::DEFAULT
4725    }
4726}
4727#[cfg_attr(feature = "ts", derive(TS))]
4728#[cfg_attr(feature = "ts", ts(export))]
4729#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4731#[cfg_attr(feature = "serde", serde(tag = "type"))]
4732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4733#[repr(u32)]
4734#[doc = "Video stream encodings"]
4735pub enum VideoStreamEncoding {
4736    #[doc = "Stream encoding is unknown"]
4737    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4738    #[doc = "Stream encoding is H.264"]
4739    VIDEO_STREAM_ENCODING_H264 = 1,
4740    #[doc = "Stream encoding is H.265"]
4741    VIDEO_STREAM_ENCODING_H265 = 2,
4742}
4743impl VideoStreamEncoding {
4744    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4745}
4746impl Default for VideoStreamEncoding {
4747    fn default() -> Self {
4748        Self::DEFAULT
4749    }
4750}
4751bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4752impl VideoStreamStatusFlags {
4753    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4754}
4755impl Default for VideoStreamStatusFlags {
4756    fn default() -> Self {
4757        Self::DEFAULT
4758    }
4759}
4760#[cfg_attr(feature = "ts", derive(TS))]
4761#[cfg_attr(feature = "ts", ts(export))]
4762#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4764#[cfg_attr(feature = "serde", serde(tag = "type"))]
4765#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4766#[repr(u32)]
4767#[doc = "Video stream types"]
4768pub enum VideoStreamType {
4769    #[doc = "Stream is RTSP"]
4770    VIDEO_STREAM_TYPE_RTSP = 0,
4771    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4772    VIDEO_STREAM_TYPE_RTPUDP = 1,
4773    #[doc = "Stream is MPEG on TCP"]
4774    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4775    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4776    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4777}
4778impl VideoStreamType {
4779    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4780}
4781impl Default for VideoStreamType {
4782    fn default() -> Self {
4783        Self::DEFAULT
4784    }
4785}
4786#[cfg_attr(feature = "ts", derive(TS))]
4787#[cfg_attr(feature = "ts", ts(export))]
4788#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4789#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4790#[cfg_attr(feature = "serde", serde(tag = "type"))]
4791#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4792#[repr(u32)]
4793#[doc = "Direction of VTOL transition"]
4794pub enum VtolTransitionHeading {
4795    #[doc = "Respect the heading configuration of the vehicle."]
4796    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4797    #[doc = "Use the heading pointing towards the next waypoint."]
4798    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4799    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4800    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4801    #[doc = "Use the specified heading in parameter 4."]
4802    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4803    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4804    VTOL_TRANSITION_HEADING_ANY = 4,
4805}
4806impl VtolTransitionHeading {
4807    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4808}
4809impl Default for VtolTransitionHeading {
4810    fn default() -> Self {
4811        Self::DEFAULT
4812    }
4813}
4814#[cfg_attr(feature = "ts", derive(TS))]
4815#[cfg_attr(feature = "ts", ts(export))]
4816#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4818#[cfg_attr(feature = "serde", serde(tag = "type"))]
4819#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4820#[repr(u32)]
4821#[doc = "WiFi Mode."]
4822pub enum WifiConfigApMode {
4823    #[doc = "WiFi mode is undefined."]
4824    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4825    #[doc = "WiFi configured as an access point."]
4826    WIFI_CONFIG_AP_MODE_AP = 1,
4827    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4828    WIFI_CONFIG_AP_MODE_STATION = 2,
4829    #[doc = "WiFi disabled."]
4830    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4831}
4832impl WifiConfigApMode {
4833    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4834}
4835impl Default for WifiConfigApMode {
4836    fn default() -> Self {
4837        Self::DEFAULT
4838    }
4839}
4840#[cfg_attr(feature = "ts", derive(TS))]
4841#[cfg_attr(feature = "ts", ts(export))]
4842#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4844#[cfg_attr(feature = "serde", serde(tag = "type"))]
4845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4846#[repr(u32)]
4847#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4848pub enum WifiConfigApResponse {
4849    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4850    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4851    #[doc = "Changes accepted."]
4852    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4853    #[doc = "Changes rejected."]
4854    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4855    #[doc = "Invalid Mode."]
4856    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4857    #[doc = "Invalid SSID."]
4858    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4859    #[doc = "Invalid Password."]
4860    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4861}
4862impl WifiConfigApResponse {
4863    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4864}
4865impl Default for WifiConfigApResponse {
4866    fn default() -> Self {
4867        Self::DEFAULT
4868    }
4869}
4870#[cfg_attr(feature = "ts", derive(TS))]
4871#[cfg_attr(feature = "ts", ts(export))]
4872#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4873#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4874#[cfg_attr(feature = "serde", serde(tag = "type"))]
4875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4876#[repr(u32)]
4877#[doc = "Winch actions."]
4878pub enum WinchActions {
4879    #[doc = "Allow motor to freewheel."]
4880    WINCH_RELAXED = 0,
4881    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4882    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4883    #[doc = "Wind or unwind line at specified rate."]
4884    WINCH_RATE_CONTROL = 2,
4885    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4886    WINCH_LOCK = 3,
4887    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4888    WINCH_DELIVER = 4,
4889    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4890    WINCH_HOLD = 5,
4891    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4892    WINCH_RETRACT = 6,
4893    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4894    WINCH_LOAD_LINE = 7,
4895    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4896    WINCH_ABANDON_LINE = 8,
4897    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4898    WINCH_LOAD_PAYLOAD = 9,
4899}
4900impl WinchActions {
4901    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4902}
4903impl Default for WinchActions {
4904    fn default() -> Self {
4905        Self::DEFAULT
4906    }
4907}
4908#[doc = "Set the vehicle attitude and body angular rates."]
4909#[doc = ""]
4910#[doc = "ID: 140"]
4911#[derive(Debug, Clone, PartialEq)]
4912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4914#[cfg_attr(feature = "ts", derive(TS))]
4915#[cfg_attr(feature = "ts", ts(export))]
4916pub struct ACTUATOR_CONTROL_TARGET_DATA {
4917    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4918    pub time_usec: u64,
4919    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4920    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4921    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4922    pub controls: [f32; 8],
4923    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4924    pub group_mlx: u8,
4925}
4926impl ACTUATOR_CONTROL_TARGET_DATA {
4927    pub const ENCODED_LEN: usize = 41usize;
4928    pub const DEFAULT: Self = Self {
4929        time_usec: 0_u64,
4930        controls: [0.0_f32; 8usize],
4931        group_mlx: 0_u8,
4932    };
4933    #[cfg(feature = "arbitrary")]
4934    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4935        use arbitrary::{Arbitrary, Unstructured};
4936        let mut buf = [0u8; 1024];
4937        rng.fill_bytes(&mut buf);
4938        let mut unstructured = Unstructured::new(&buf);
4939        Self::arbitrary(&mut unstructured).unwrap_or_default()
4940    }
4941}
4942impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4943    fn default() -> Self {
4944        Self::DEFAULT.clone()
4945    }
4946}
4947impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4948    type Message = MavMessage;
4949    const ID: u32 = 140u32;
4950    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4951    const EXTRA_CRC: u8 = 181u8;
4952    const ENCODED_LEN: usize = 41usize;
4953    fn deser(
4954        _version: MavlinkVersion,
4955        __input: &[u8],
4956    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4957        let avail_len = __input.len();
4958        let mut payload_buf = [0; Self::ENCODED_LEN];
4959        let mut buf = if avail_len < Self::ENCODED_LEN {
4960            payload_buf[0..avail_len].copy_from_slice(__input);
4961            Bytes::new(&payload_buf)
4962        } else {
4963            Bytes::new(__input)
4964        };
4965        let mut __struct = Self::default();
4966        __struct.time_usec = buf.get_u64_le();
4967        for v in &mut __struct.controls {
4968            let val = buf.get_f32_le();
4969            *v = val;
4970        }
4971        __struct.group_mlx = buf.get_u8();
4972        Ok(__struct)
4973    }
4974    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4975        let mut __tmp = BytesMut::new(bytes);
4976        #[allow(clippy::absurd_extreme_comparisons)]
4977        #[allow(unused_comparisons)]
4978        if __tmp.remaining() < Self::ENCODED_LEN {
4979            panic!(
4980                "buffer is too small (need {} bytes, but got {})",
4981                Self::ENCODED_LEN,
4982                __tmp.remaining(),
4983            )
4984        }
4985        __tmp.put_u64_le(self.time_usec);
4986        for val in &self.controls {
4987            __tmp.put_f32_le(*val);
4988        }
4989        __tmp.put_u8(self.group_mlx);
4990        if matches!(version, MavlinkVersion::V2) {
4991            let len = __tmp.len();
4992            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4993        } else {
4994            __tmp.len()
4995        }
4996    }
4997}
4998#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4999#[doc = ""]
5000#[doc = "ID: 375"]
5001#[derive(Debug, Clone, PartialEq)]
5002#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5003#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5004#[cfg_attr(feature = "ts", derive(TS))]
5005#[cfg_attr(feature = "ts", ts(export))]
5006pub struct ACTUATOR_OUTPUT_STATUS_DATA {
5007    #[doc = "Timestamp (since system boot)."]
5008    pub time_usec: u64,
5009    #[doc = "Active outputs"]
5010    pub active: u32,
5011    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
5012    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5013    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5014    pub actuator: [f32; 32],
5015}
5016impl ACTUATOR_OUTPUT_STATUS_DATA {
5017    pub const ENCODED_LEN: usize = 140usize;
5018    pub const DEFAULT: Self = Self {
5019        time_usec: 0_u64,
5020        active: 0_u32,
5021        actuator: [0.0_f32; 32usize],
5022    };
5023    #[cfg(feature = "arbitrary")]
5024    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5025        use arbitrary::{Arbitrary, Unstructured};
5026        let mut buf = [0u8; 1024];
5027        rng.fill_bytes(&mut buf);
5028        let mut unstructured = Unstructured::new(&buf);
5029        Self::arbitrary(&mut unstructured).unwrap_or_default()
5030    }
5031}
5032impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
5033    fn default() -> Self {
5034        Self::DEFAULT.clone()
5035    }
5036}
5037impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
5038    type Message = MavMessage;
5039    const ID: u32 = 375u32;
5040    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
5041    const EXTRA_CRC: u8 = 251u8;
5042    const ENCODED_LEN: usize = 140usize;
5043    fn deser(
5044        _version: MavlinkVersion,
5045        __input: &[u8],
5046    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5047        let avail_len = __input.len();
5048        let mut payload_buf = [0; Self::ENCODED_LEN];
5049        let mut buf = if avail_len < Self::ENCODED_LEN {
5050            payload_buf[0..avail_len].copy_from_slice(__input);
5051            Bytes::new(&payload_buf)
5052        } else {
5053            Bytes::new(__input)
5054        };
5055        let mut __struct = Self::default();
5056        __struct.time_usec = buf.get_u64_le();
5057        __struct.active = buf.get_u32_le();
5058        for v in &mut __struct.actuator {
5059            let val = buf.get_f32_le();
5060            *v = val;
5061        }
5062        Ok(__struct)
5063    }
5064    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5065        let mut __tmp = BytesMut::new(bytes);
5066        #[allow(clippy::absurd_extreme_comparisons)]
5067        #[allow(unused_comparisons)]
5068        if __tmp.remaining() < Self::ENCODED_LEN {
5069            panic!(
5070                "buffer is too small (need {} bytes, but got {})",
5071                Self::ENCODED_LEN,
5072                __tmp.remaining(),
5073            )
5074        }
5075        __tmp.put_u64_le(self.time_usec);
5076        __tmp.put_u32_le(self.active);
5077        for val in &self.actuator {
5078            __tmp.put_f32_le(*val);
5079        }
5080        if matches!(version, MavlinkVersion::V2) {
5081            let len = __tmp.len();
5082            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5083        } else {
5084            __tmp.len()
5085        }
5086    }
5087}
5088#[doc = "The location and information of an ADSB vehicle."]
5089#[doc = ""]
5090#[doc = "ID: 246"]
5091#[derive(Debug, Clone, PartialEq)]
5092#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5093#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5094#[cfg_attr(feature = "ts", derive(TS))]
5095#[cfg_attr(feature = "ts", ts(export))]
5096pub struct ADSB_VEHICLE_DATA {
5097    #[doc = "ICAO address"]
5098    pub ICAO_address: u32,
5099    #[doc = "Latitude"]
5100    pub lat: i32,
5101    #[doc = "Longitude"]
5102    pub lon: i32,
5103    #[doc = "Altitude(ASL)"]
5104    pub altitude: i32,
5105    #[doc = "Course over ground"]
5106    pub heading: u16,
5107    #[doc = "The horizontal velocity"]
5108    pub hor_velocity: u16,
5109    #[doc = "The vertical velocity. Positive is up"]
5110    pub ver_velocity: i16,
5111    #[doc = "Bitmap to indicate various statuses including valid data fields"]
5112    pub flags: AdsbFlags,
5113    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
5114    pub squawk: u16,
5115    #[doc = "ADSB altitude type."]
5116    pub altitude_type: AdsbAltitudeType,
5117    #[doc = "The callsign, 8+null"]
5118    #[cfg_attr(feature = "ts", ts(type = "string"))]
5119    pub callsign: CharArray<9>,
5120    #[doc = "ADSB emitter type."]
5121    pub emitter_type: AdsbEmitterType,
5122    #[doc = "Time since last communication in seconds"]
5123    pub tslc: u8,
5124}
5125impl ADSB_VEHICLE_DATA {
5126    pub const ENCODED_LEN: usize = 38usize;
5127    pub const DEFAULT: Self = Self {
5128        ICAO_address: 0_u32,
5129        lat: 0_i32,
5130        lon: 0_i32,
5131        altitude: 0_i32,
5132        heading: 0_u16,
5133        hor_velocity: 0_u16,
5134        ver_velocity: 0_i16,
5135        flags: AdsbFlags::DEFAULT,
5136        squawk: 0_u16,
5137        altitude_type: AdsbAltitudeType::DEFAULT,
5138        callsign: CharArray::new([0_u8; 9usize]),
5139        emitter_type: AdsbEmitterType::DEFAULT,
5140        tslc: 0_u8,
5141    };
5142    #[cfg(feature = "arbitrary")]
5143    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5144        use arbitrary::{Arbitrary, Unstructured};
5145        let mut buf = [0u8; 1024];
5146        rng.fill_bytes(&mut buf);
5147        let mut unstructured = Unstructured::new(&buf);
5148        Self::arbitrary(&mut unstructured).unwrap_or_default()
5149    }
5150}
5151impl Default for ADSB_VEHICLE_DATA {
5152    fn default() -> Self {
5153        Self::DEFAULT.clone()
5154    }
5155}
5156impl MessageData for ADSB_VEHICLE_DATA {
5157    type Message = MavMessage;
5158    const ID: u32 = 246u32;
5159    const NAME: &'static str = "ADSB_VEHICLE";
5160    const EXTRA_CRC: u8 = 184u8;
5161    const ENCODED_LEN: usize = 38usize;
5162    fn deser(
5163        _version: MavlinkVersion,
5164        __input: &[u8],
5165    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5166        let avail_len = __input.len();
5167        let mut payload_buf = [0; Self::ENCODED_LEN];
5168        let mut buf = if avail_len < Self::ENCODED_LEN {
5169            payload_buf[0..avail_len].copy_from_slice(__input);
5170            Bytes::new(&payload_buf)
5171        } else {
5172            Bytes::new(__input)
5173        };
5174        let mut __struct = Self::default();
5175        __struct.ICAO_address = buf.get_u32_le();
5176        __struct.lat = buf.get_i32_le();
5177        __struct.lon = buf.get_i32_le();
5178        __struct.altitude = buf.get_i32_le();
5179        __struct.heading = buf.get_u16_le();
5180        __struct.hor_velocity = buf.get_u16_le();
5181        __struct.ver_velocity = buf.get_i16_le();
5182        let tmp = buf.get_u16_le();
5183        __struct.flags = AdsbFlags::from_bits(tmp as <AdsbFlags as Flags>::Bits).ok_or(
5184            ::mavlink_core::error::ParserError::InvalidFlag {
5185                flag_type: "AdsbFlags",
5186                value: tmp as u64,
5187            },
5188        )?;
5189        __struct.squawk = buf.get_u16_le();
5190        let tmp = buf.get_u8();
5191        __struct.altitude_type =
5192            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5193                enum_type: "AdsbAltitudeType",
5194                value: tmp as u64,
5195            })?;
5196        let mut tmp = [0_u8; 9usize];
5197        for v in &mut tmp {
5198            *v = buf.get_u8();
5199        }
5200        __struct.callsign = CharArray::new(tmp);
5201        let tmp = buf.get_u8();
5202        __struct.emitter_type =
5203            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5204                enum_type: "AdsbEmitterType",
5205                value: tmp as u64,
5206            })?;
5207        __struct.tslc = buf.get_u8();
5208        Ok(__struct)
5209    }
5210    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5211        let mut __tmp = BytesMut::new(bytes);
5212        #[allow(clippy::absurd_extreme_comparisons)]
5213        #[allow(unused_comparisons)]
5214        if __tmp.remaining() < Self::ENCODED_LEN {
5215            panic!(
5216                "buffer is too small (need {} bytes, but got {})",
5217                Self::ENCODED_LEN,
5218                __tmp.remaining(),
5219            )
5220        }
5221        __tmp.put_u32_le(self.ICAO_address);
5222        __tmp.put_i32_le(self.lat);
5223        __tmp.put_i32_le(self.lon);
5224        __tmp.put_i32_le(self.altitude);
5225        __tmp.put_u16_le(self.heading);
5226        __tmp.put_u16_le(self.hor_velocity);
5227        __tmp.put_i16_le(self.ver_velocity);
5228        __tmp.put_u16_le(self.flags.bits() as u16);
5229        __tmp.put_u16_le(self.squawk);
5230        __tmp.put_u8(self.altitude_type as u8);
5231        for val in &self.callsign {
5232            __tmp.put_u8(*val);
5233        }
5234        __tmp.put_u8(self.emitter_type as u8);
5235        __tmp.put_u8(self.tslc);
5236        if matches!(version, MavlinkVersion::V2) {
5237            let len = __tmp.len();
5238            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5239        } else {
5240            __tmp.len()
5241        }
5242    }
5243}
5244#[doc = "The location and information of an AIS vessel."]
5245#[doc = ""]
5246#[doc = "ID: 301"]
5247#[derive(Debug, Clone, PartialEq)]
5248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5250#[cfg_attr(feature = "ts", derive(TS))]
5251#[cfg_attr(feature = "ts", ts(export))]
5252pub struct AIS_VESSEL_DATA {
5253    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5254    pub MMSI: u32,
5255    #[doc = "Latitude"]
5256    pub lat: i32,
5257    #[doc = "Longitude"]
5258    pub lon: i32,
5259    #[doc = "Course over ground"]
5260    pub COG: u16,
5261    #[doc = "True heading"]
5262    pub heading: u16,
5263    #[doc = "Speed over ground"]
5264    pub velocity: u16,
5265    #[doc = "Distance from lat/lon location to bow"]
5266    pub dimension_bow: u16,
5267    #[doc = "Distance from lat/lon location to stern"]
5268    pub dimension_stern: u16,
5269    #[doc = "Time since last communication in seconds"]
5270    pub tslc: u16,
5271    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5272    pub flags: AisFlags,
5273    #[doc = "Turn rate"]
5274    pub turn_rate: i8,
5275    #[doc = "Navigational status"]
5276    pub navigational_status: AisNavStatus,
5277    #[doc = "Type of vessels"]
5278    pub mavtype: AisType,
5279    #[doc = "Distance from lat/lon location to port side"]
5280    pub dimension_port: u8,
5281    #[doc = "Distance from lat/lon location to starboard side"]
5282    pub dimension_starboard: u8,
5283    #[doc = "The vessel callsign"]
5284    #[cfg_attr(feature = "ts", ts(type = "string"))]
5285    pub callsign: CharArray<7>,
5286    #[doc = "The vessel name"]
5287    #[cfg_attr(feature = "ts", ts(type = "string"))]
5288    pub name: CharArray<20>,
5289}
5290impl AIS_VESSEL_DATA {
5291    pub const ENCODED_LEN: usize = 58usize;
5292    pub const DEFAULT: Self = Self {
5293        MMSI: 0_u32,
5294        lat: 0_i32,
5295        lon: 0_i32,
5296        COG: 0_u16,
5297        heading: 0_u16,
5298        velocity: 0_u16,
5299        dimension_bow: 0_u16,
5300        dimension_stern: 0_u16,
5301        tslc: 0_u16,
5302        flags: AisFlags::DEFAULT,
5303        turn_rate: 0_i8,
5304        navigational_status: AisNavStatus::DEFAULT,
5305        mavtype: AisType::DEFAULT,
5306        dimension_port: 0_u8,
5307        dimension_starboard: 0_u8,
5308        callsign: CharArray::new([0_u8; 7usize]),
5309        name: CharArray::new([0_u8; 20usize]),
5310    };
5311    #[cfg(feature = "arbitrary")]
5312    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5313        use arbitrary::{Arbitrary, Unstructured};
5314        let mut buf = [0u8; 1024];
5315        rng.fill_bytes(&mut buf);
5316        let mut unstructured = Unstructured::new(&buf);
5317        Self::arbitrary(&mut unstructured).unwrap_or_default()
5318    }
5319}
5320impl Default for AIS_VESSEL_DATA {
5321    fn default() -> Self {
5322        Self::DEFAULT.clone()
5323    }
5324}
5325impl MessageData for AIS_VESSEL_DATA {
5326    type Message = MavMessage;
5327    const ID: u32 = 301u32;
5328    const NAME: &'static str = "AIS_VESSEL";
5329    const EXTRA_CRC: u8 = 243u8;
5330    const ENCODED_LEN: usize = 58usize;
5331    fn deser(
5332        _version: MavlinkVersion,
5333        __input: &[u8],
5334    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5335        let avail_len = __input.len();
5336        let mut payload_buf = [0; Self::ENCODED_LEN];
5337        let mut buf = if avail_len < Self::ENCODED_LEN {
5338            payload_buf[0..avail_len].copy_from_slice(__input);
5339            Bytes::new(&payload_buf)
5340        } else {
5341            Bytes::new(__input)
5342        };
5343        let mut __struct = Self::default();
5344        __struct.MMSI = buf.get_u32_le();
5345        __struct.lat = buf.get_i32_le();
5346        __struct.lon = buf.get_i32_le();
5347        __struct.COG = buf.get_u16_le();
5348        __struct.heading = buf.get_u16_le();
5349        __struct.velocity = buf.get_u16_le();
5350        __struct.dimension_bow = buf.get_u16_le();
5351        __struct.dimension_stern = buf.get_u16_le();
5352        __struct.tslc = buf.get_u16_le();
5353        let tmp = buf.get_u16_le();
5354        __struct.flags = AisFlags::from_bits(tmp as <AisFlags as Flags>::Bits).ok_or(
5355            ::mavlink_core::error::ParserError::InvalidFlag {
5356                flag_type: "AisFlags",
5357                value: tmp as u64,
5358            },
5359        )?;
5360        __struct.turn_rate = buf.get_i8();
5361        let tmp = buf.get_u8();
5362        __struct.navigational_status =
5363            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5364                enum_type: "AisNavStatus",
5365                value: tmp as u64,
5366            })?;
5367        let tmp = buf.get_u8();
5368        __struct.mavtype =
5369            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5370                enum_type: "AisType",
5371                value: tmp as u64,
5372            })?;
5373        __struct.dimension_port = buf.get_u8();
5374        __struct.dimension_starboard = buf.get_u8();
5375        let mut tmp = [0_u8; 7usize];
5376        for v in &mut tmp {
5377            *v = buf.get_u8();
5378        }
5379        __struct.callsign = CharArray::new(tmp);
5380        let mut tmp = [0_u8; 20usize];
5381        for v in &mut tmp {
5382            *v = buf.get_u8();
5383        }
5384        __struct.name = CharArray::new(tmp);
5385        Ok(__struct)
5386    }
5387    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5388        let mut __tmp = BytesMut::new(bytes);
5389        #[allow(clippy::absurd_extreme_comparisons)]
5390        #[allow(unused_comparisons)]
5391        if __tmp.remaining() < Self::ENCODED_LEN {
5392            panic!(
5393                "buffer is too small (need {} bytes, but got {})",
5394                Self::ENCODED_LEN,
5395                __tmp.remaining(),
5396            )
5397        }
5398        __tmp.put_u32_le(self.MMSI);
5399        __tmp.put_i32_le(self.lat);
5400        __tmp.put_i32_le(self.lon);
5401        __tmp.put_u16_le(self.COG);
5402        __tmp.put_u16_le(self.heading);
5403        __tmp.put_u16_le(self.velocity);
5404        __tmp.put_u16_le(self.dimension_bow);
5405        __tmp.put_u16_le(self.dimension_stern);
5406        __tmp.put_u16_le(self.tslc);
5407        __tmp.put_u16_le(self.flags.bits() as u16);
5408        __tmp.put_i8(self.turn_rate);
5409        __tmp.put_u8(self.navigational_status as u8);
5410        __tmp.put_u8(self.mavtype as u8);
5411        __tmp.put_u8(self.dimension_port);
5412        __tmp.put_u8(self.dimension_starboard);
5413        for val in &self.callsign {
5414            __tmp.put_u8(*val);
5415        }
5416        for val in &self.name {
5417            __tmp.put_u8(*val);
5418        }
5419        if matches!(version, MavlinkVersion::V2) {
5420            let len = __tmp.len();
5421            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5422        } else {
5423            __tmp.len()
5424        }
5425    }
5426}
5427#[doc = "The current system altitude."]
5428#[doc = ""]
5429#[doc = "ID: 141"]
5430#[derive(Debug, Clone, PartialEq)]
5431#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5433#[cfg_attr(feature = "ts", derive(TS))]
5434#[cfg_attr(feature = "ts", ts(export))]
5435pub struct ALTITUDE_DATA {
5436    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5437    pub time_usec: u64,
5438    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5439    pub altitude_monotonic: f32,
5440    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5441    pub altitude_amsl: f32,
5442    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5443    pub altitude_local: f32,
5444    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5445    pub altitude_relative: f32,
5446    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5447    pub altitude_terrain: f32,
5448    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5449    pub bottom_clearance: f32,
5450}
5451impl ALTITUDE_DATA {
5452    pub const ENCODED_LEN: usize = 32usize;
5453    pub const DEFAULT: Self = Self {
5454        time_usec: 0_u64,
5455        altitude_monotonic: 0.0_f32,
5456        altitude_amsl: 0.0_f32,
5457        altitude_local: 0.0_f32,
5458        altitude_relative: 0.0_f32,
5459        altitude_terrain: 0.0_f32,
5460        bottom_clearance: 0.0_f32,
5461    };
5462    #[cfg(feature = "arbitrary")]
5463    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5464        use arbitrary::{Arbitrary, Unstructured};
5465        let mut buf = [0u8; 1024];
5466        rng.fill_bytes(&mut buf);
5467        let mut unstructured = Unstructured::new(&buf);
5468        Self::arbitrary(&mut unstructured).unwrap_or_default()
5469    }
5470}
5471impl Default for ALTITUDE_DATA {
5472    fn default() -> Self {
5473        Self::DEFAULT.clone()
5474    }
5475}
5476impl MessageData for ALTITUDE_DATA {
5477    type Message = MavMessage;
5478    const ID: u32 = 141u32;
5479    const NAME: &'static str = "ALTITUDE";
5480    const EXTRA_CRC: u8 = 47u8;
5481    const ENCODED_LEN: usize = 32usize;
5482    fn deser(
5483        _version: MavlinkVersion,
5484        __input: &[u8],
5485    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5486        let avail_len = __input.len();
5487        let mut payload_buf = [0; Self::ENCODED_LEN];
5488        let mut buf = if avail_len < Self::ENCODED_LEN {
5489            payload_buf[0..avail_len].copy_from_slice(__input);
5490            Bytes::new(&payload_buf)
5491        } else {
5492            Bytes::new(__input)
5493        };
5494        let mut __struct = Self::default();
5495        __struct.time_usec = buf.get_u64_le();
5496        __struct.altitude_monotonic = buf.get_f32_le();
5497        __struct.altitude_amsl = buf.get_f32_le();
5498        __struct.altitude_local = buf.get_f32_le();
5499        __struct.altitude_relative = buf.get_f32_le();
5500        __struct.altitude_terrain = buf.get_f32_le();
5501        __struct.bottom_clearance = buf.get_f32_le();
5502        Ok(__struct)
5503    }
5504    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5505        let mut __tmp = BytesMut::new(bytes);
5506        #[allow(clippy::absurd_extreme_comparisons)]
5507        #[allow(unused_comparisons)]
5508        if __tmp.remaining() < Self::ENCODED_LEN {
5509            panic!(
5510                "buffer is too small (need {} bytes, but got {})",
5511                Self::ENCODED_LEN,
5512                __tmp.remaining(),
5513            )
5514        }
5515        __tmp.put_u64_le(self.time_usec);
5516        __tmp.put_f32_le(self.altitude_monotonic);
5517        __tmp.put_f32_le(self.altitude_amsl);
5518        __tmp.put_f32_le(self.altitude_local);
5519        __tmp.put_f32_le(self.altitude_relative);
5520        __tmp.put_f32_le(self.altitude_terrain);
5521        __tmp.put_f32_le(self.bottom_clearance);
5522        if matches!(version, MavlinkVersion::V2) {
5523            let len = __tmp.len();
5524            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5525        } else {
5526            __tmp.len()
5527        }
5528    }
5529}
5530#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5531#[doc = ""]
5532#[doc = "ID: 30"]
5533#[derive(Debug, Clone, PartialEq)]
5534#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5535#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5536#[cfg_attr(feature = "ts", derive(TS))]
5537#[cfg_attr(feature = "ts", ts(export))]
5538pub struct ATTITUDE_DATA {
5539    #[doc = "Timestamp (time since system boot)."]
5540    pub time_boot_ms: u32,
5541    #[doc = "Roll angle (-pi..+pi)"]
5542    pub roll: f32,
5543    #[doc = "Pitch angle (-pi..+pi)"]
5544    pub pitch: f32,
5545    #[doc = "Yaw angle (-pi..+pi)"]
5546    pub yaw: f32,
5547    #[doc = "Roll angular speed"]
5548    pub rollspeed: f32,
5549    #[doc = "Pitch angular speed"]
5550    pub pitchspeed: f32,
5551    #[doc = "Yaw angular speed"]
5552    pub yawspeed: f32,
5553}
5554impl ATTITUDE_DATA {
5555    pub const ENCODED_LEN: usize = 28usize;
5556    pub const DEFAULT: Self = Self {
5557        time_boot_ms: 0_u32,
5558        roll: 0.0_f32,
5559        pitch: 0.0_f32,
5560        yaw: 0.0_f32,
5561        rollspeed: 0.0_f32,
5562        pitchspeed: 0.0_f32,
5563        yawspeed: 0.0_f32,
5564    };
5565    #[cfg(feature = "arbitrary")]
5566    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5567        use arbitrary::{Arbitrary, Unstructured};
5568        let mut buf = [0u8; 1024];
5569        rng.fill_bytes(&mut buf);
5570        let mut unstructured = Unstructured::new(&buf);
5571        Self::arbitrary(&mut unstructured).unwrap_or_default()
5572    }
5573}
5574impl Default for ATTITUDE_DATA {
5575    fn default() -> Self {
5576        Self::DEFAULT.clone()
5577    }
5578}
5579impl MessageData for ATTITUDE_DATA {
5580    type Message = MavMessage;
5581    const ID: u32 = 30u32;
5582    const NAME: &'static str = "ATTITUDE";
5583    const EXTRA_CRC: u8 = 39u8;
5584    const ENCODED_LEN: usize = 28usize;
5585    fn deser(
5586        _version: MavlinkVersion,
5587        __input: &[u8],
5588    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5589        let avail_len = __input.len();
5590        let mut payload_buf = [0; Self::ENCODED_LEN];
5591        let mut buf = if avail_len < Self::ENCODED_LEN {
5592            payload_buf[0..avail_len].copy_from_slice(__input);
5593            Bytes::new(&payload_buf)
5594        } else {
5595            Bytes::new(__input)
5596        };
5597        let mut __struct = Self::default();
5598        __struct.time_boot_ms = buf.get_u32_le();
5599        __struct.roll = buf.get_f32_le();
5600        __struct.pitch = buf.get_f32_le();
5601        __struct.yaw = buf.get_f32_le();
5602        __struct.rollspeed = buf.get_f32_le();
5603        __struct.pitchspeed = buf.get_f32_le();
5604        __struct.yawspeed = buf.get_f32_le();
5605        Ok(__struct)
5606    }
5607    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5608        let mut __tmp = BytesMut::new(bytes);
5609        #[allow(clippy::absurd_extreme_comparisons)]
5610        #[allow(unused_comparisons)]
5611        if __tmp.remaining() < Self::ENCODED_LEN {
5612            panic!(
5613                "buffer is too small (need {} bytes, but got {})",
5614                Self::ENCODED_LEN,
5615                __tmp.remaining(),
5616            )
5617        }
5618        __tmp.put_u32_le(self.time_boot_ms);
5619        __tmp.put_f32_le(self.roll);
5620        __tmp.put_f32_le(self.pitch);
5621        __tmp.put_f32_le(self.yaw);
5622        __tmp.put_f32_le(self.rollspeed);
5623        __tmp.put_f32_le(self.pitchspeed);
5624        __tmp.put_f32_le(self.yawspeed);
5625        if matches!(version, MavlinkVersion::V2) {
5626            let len = __tmp.len();
5627            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5628        } else {
5629            __tmp.len()
5630        }
5631    }
5632}
5633#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5634#[doc = ""]
5635#[doc = "ID: 31"]
5636#[derive(Debug, Clone, PartialEq)]
5637#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5638#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5639#[cfg_attr(feature = "ts", derive(TS))]
5640#[cfg_attr(feature = "ts", ts(export))]
5641pub struct ATTITUDE_QUATERNION_DATA {
5642    #[doc = "Timestamp (time since system boot)."]
5643    pub time_boot_ms: u32,
5644    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5645    pub q1: f32,
5646    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5647    pub q2: f32,
5648    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5649    pub q3: f32,
5650    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5651    pub q4: f32,
5652    #[doc = "Roll angular speed"]
5653    pub rollspeed: f32,
5654    #[doc = "Pitch angular speed"]
5655    pub pitchspeed: f32,
5656    #[doc = "Yaw angular speed"]
5657    pub yawspeed: f32,
5658    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5659    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5660    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5661    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5662    pub repr_offset_q: [f32; 4],
5663}
5664impl ATTITUDE_QUATERNION_DATA {
5665    pub const ENCODED_LEN: usize = 48usize;
5666    pub const DEFAULT: Self = Self {
5667        time_boot_ms: 0_u32,
5668        q1: 0.0_f32,
5669        q2: 0.0_f32,
5670        q3: 0.0_f32,
5671        q4: 0.0_f32,
5672        rollspeed: 0.0_f32,
5673        pitchspeed: 0.0_f32,
5674        yawspeed: 0.0_f32,
5675        repr_offset_q: [0.0_f32; 4usize],
5676    };
5677    #[cfg(feature = "arbitrary")]
5678    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5679        use arbitrary::{Arbitrary, Unstructured};
5680        let mut buf = [0u8; 1024];
5681        rng.fill_bytes(&mut buf);
5682        let mut unstructured = Unstructured::new(&buf);
5683        Self::arbitrary(&mut unstructured).unwrap_or_default()
5684    }
5685}
5686impl Default for ATTITUDE_QUATERNION_DATA {
5687    fn default() -> Self {
5688        Self::DEFAULT.clone()
5689    }
5690}
5691impl MessageData for ATTITUDE_QUATERNION_DATA {
5692    type Message = MavMessage;
5693    const ID: u32 = 31u32;
5694    const NAME: &'static str = "ATTITUDE_QUATERNION";
5695    const EXTRA_CRC: u8 = 246u8;
5696    const ENCODED_LEN: usize = 48usize;
5697    fn deser(
5698        _version: MavlinkVersion,
5699        __input: &[u8],
5700    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5701        let avail_len = __input.len();
5702        let mut payload_buf = [0; Self::ENCODED_LEN];
5703        let mut buf = if avail_len < Self::ENCODED_LEN {
5704            payload_buf[0..avail_len].copy_from_slice(__input);
5705            Bytes::new(&payload_buf)
5706        } else {
5707            Bytes::new(__input)
5708        };
5709        let mut __struct = Self::default();
5710        __struct.time_boot_ms = buf.get_u32_le();
5711        __struct.q1 = buf.get_f32_le();
5712        __struct.q2 = buf.get_f32_le();
5713        __struct.q3 = buf.get_f32_le();
5714        __struct.q4 = buf.get_f32_le();
5715        __struct.rollspeed = buf.get_f32_le();
5716        __struct.pitchspeed = buf.get_f32_le();
5717        __struct.yawspeed = buf.get_f32_le();
5718        for v in &mut __struct.repr_offset_q {
5719            let val = buf.get_f32_le();
5720            *v = val;
5721        }
5722        Ok(__struct)
5723    }
5724    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5725        let mut __tmp = BytesMut::new(bytes);
5726        #[allow(clippy::absurd_extreme_comparisons)]
5727        #[allow(unused_comparisons)]
5728        if __tmp.remaining() < Self::ENCODED_LEN {
5729            panic!(
5730                "buffer is too small (need {} bytes, but got {})",
5731                Self::ENCODED_LEN,
5732                __tmp.remaining(),
5733            )
5734        }
5735        __tmp.put_u32_le(self.time_boot_ms);
5736        __tmp.put_f32_le(self.q1);
5737        __tmp.put_f32_le(self.q2);
5738        __tmp.put_f32_le(self.q3);
5739        __tmp.put_f32_le(self.q4);
5740        __tmp.put_f32_le(self.rollspeed);
5741        __tmp.put_f32_le(self.pitchspeed);
5742        __tmp.put_f32_le(self.yawspeed);
5743        if matches!(version, MavlinkVersion::V2) {
5744            for val in &self.repr_offset_q {
5745                __tmp.put_f32_le(*val);
5746            }
5747            let len = __tmp.len();
5748            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5749        } else {
5750            __tmp.len()
5751        }
5752    }
5753}
5754#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5755#[doc = ""]
5756#[doc = "ID: 61"]
5757#[derive(Debug, Clone, PartialEq)]
5758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5759#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5760#[cfg_attr(feature = "ts", derive(TS))]
5761#[cfg_attr(feature = "ts", ts(export))]
5762pub struct ATTITUDE_QUATERNION_COV_DATA {
5763    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5764    pub time_usec: u64,
5765    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5766    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5767    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5768    pub q: [f32; 4],
5769    #[doc = "Roll angular speed"]
5770    pub rollspeed: f32,
5771    #[doc = "Pitch angular speed"]
5772    pub pitchspeed: f32,
5773    #[doc = "Yaw angular speed"]
5774    pub yawspeed: f32,
5775    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5776    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5777    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5778    pub covariance: [f32; 9],
5779}
5780impl ATTITUDE_QUATERNION_COV_DATA {
5781    pub const ENCODED_LEN: usize = 72usize;
5782    pub const DEFAULT: Self = Self {
5783        time_usec: 0_u64,
5784        q: [0.0_f32; 4usize],
5785        rollspeed: 0.0_f32,
5786        pitchspeed: 0.0_f32,
5787        yawspeed: 0.0_f32,
5788        covariance: [0.0_f32; 9usize],
5789    };
5790    #[cfg(feature = "arbitrary")]
5791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5792        use arbitrary::{Arbitrary, Unstructured};
5793        let mut buf = [0u8; 1024];
5794        rng.fill_bytes(&mut buf);
5795        let mut unstructured = Unstructured::new(&buf);
5796        Self::arbitrary(&mut unstructured).unwrap_or_default()
5797    }
5798}
5799impl Default for ATTITUDE_QUATERNION_COV_DATA {
5800    fn default() -> Self {
5801        Self::DEFAULT.clone()
5802    }
5803}
5804impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5805    type Message = MavMessage;
5806    const ID: u32 = 61u32;
5807    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5808    const EXTRA_CRC: u8 = 167u8;
5809    const ENCODED_LEN: usize = 72usize;
5810    fn deser(
5811        _version: MavlinkVersion,
5812        __input: &[u8],
5813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5814        let avail_len = __input.len();
5815        let mut payload_buf = [0; Self::ENCODED_LEN];
5816        let mut buf = if avail_len < Self::ENCODED_LEN {
5817            payload_buf[0..avail_len].copy_from_slice(__input);
5818            Bytes::new(&payload_buf)
5819        } else {
5820            Bytes::new(__input)
5821        };
5822        let mut __struct = Self::default();
5823        __struct.time_usec = buf.get_u64_le();
5824        for v in &mut __struct.q {
5825            let val = buf.get_f32_le();
5826            *v = val;
5827        }
5828        __struct.rollspeed = buf.get_f32_le();
5829        __struct.pitchspeed = buf.get_f32_le();
5830        __struct.yawspeed = buf.get_f32_le();
5831        for v in &mut __struct.covariance {
5832            let val = buf.get_f32_le();
5833            *v = val;
5834        }
5835        Ok(__struct)
5836    }
5837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5838        let mut __tmp = BytesMut::new(bytes);
5839        #[allow(clippy::absurd_extreme_comparisons)]
5840        #[allow(unused_comparisons)]
5841        if __tmp.remaining() < Self::ENCODED_LEN {
5842            panic!(
5843                "buffer is too small (need {} bytes, but got {})",
5844                Self::ENCODED_LEN,
5845                __tmp.remaining(),
5846            )
5847        }
5848        __tmp.put_u64_le(self.time_usec);
5849        for val in &self.q {
5850            __tmp.put_f32_le(*val);
5851        }
5852        __tmp.put_f32_le(self.rollspeed);
5853        __tmp.put_f32_le(self.pitchspeed);
5854        __tmp.put_f32_le(self.yawspeed);
5855        for val in &self.covariance {
5856            __tmp.put_f32_le(*val);
5857        }
5858        if matches!(version, MavlinkVersion::V2) {
5859            let len = __tmp.len();
5860            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5861        } else {
5862            __tmp.len()
5863        }
5864    }
5865}
5866#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5867#[doc = ""]
5868#[doc = "ID: 83"]
5869#[derive(Debug, Clone, PartialEq)]
5870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5872#[cfg_attr(feature = "ts", derive(TS))]
5873#[cfg_attr(feature = "ts", ts(export))]
5874pub struct ATTITUDE_TARGET_DATA {
5875    #[doc = "Timestamp (time since system boot)."]
5876    pub time_boot_ms: u32,
5877    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5878    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5879    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5880    pub q: [f32; 4],
5881    #[doc = "Body roll rate"]
5882    pub body_roll_rate: f32,
5883    #[doc = "Body pitch rate"]
5884    pub body_pitch_rate: f32,
5885    #[doc = "Body yaw rate"]
5886    pub body_yaw_rate: f32,
5887    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5888    pub thrust: f32,
5889    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5890    pub type_mask: AttitudeTargetTypemask,
5891}
5892impl ATTITUDE_TARGET_DATA {
5893    pub const ENCODED_LEN: usize = 37usize;
5894    pub const DEFAULT: Self = Self {
5895        time_boot_ms: 0_u32,
5896        q: [0.0_f32; 4usize],
5897        body_roll_rate: 0.0_f32,
5898        body_pitch_rate: 0.0_f32,
5899        body_yaw_rate: 0.0_f32,
5900        thrust: 0.0_f32,
5901        type_mask: AttitudeTargetTypemask::DEFAULT,
5902    };
5903    #[cfg(feature = "arbitrary")]
5904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5905        use arbitrary::{Arbitrary, Unstructured};
5906        let mut buf = [0u8; 1024];
5907        rng.fill_bytes(&mut buf);
5908        let mut unstructured = Unstructured::new(&buf);
5909        Self::arbitrary(&mut unstructured).unwrap_or_default()
5910    }
5911}
5912impl Default for ATTITUDE_TARGET_DATA {
5913    fn default() -> Self {
5914        Self::DEFAULT.clone()
5915    }
5916}
5917impl MessageData for ATTITUDE_TARGET_DATA {
5918    type Message = MavMessage;
5919    const ID: u32 = 83u32;
5920    const NAME: &'static str = "ATTITUDE_TARGET";
5921    const EXTRA_CRC: u8 = 22u8;
5922    const ENCODED_LEN: usize = 37usize;
5923    fn deser(
5924        _version: MavlinkVersion,
5925        __input: &[u8],
5926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5927        let avail_len = __input.len();
5928        let mut payload_buf = [0; Self::ENCODED_LEN];
5929        let mut buf = if avail_len < Self::ENCODED_LEN {
5930            payload_buf[0..avail_len].copy_from_slice(__input);
5931            Bytes::new(&payload_buf)
5932        } else {
5933            Bytes::new(__input)
5934        };
5935        let mut __struct = Self::default();
5936        __struct.time_boot_ms = buf.get_u32_le();
5937        for v in &mut __struct.q {
5938            let val = buf.get_f32_le();
5939            *v = val;
5940        }
5941        __struct.body_roll_rate = buf.get_f32_le();
5942        __struct.body_pitch_rate = buf.get_f32_le();
5943        __struct.body_yaw_rate = buf.get_f32_le();
5944        __struct.thrust = buf.get_f32_le();
5945        let tmp = buf.get_u8();
5946        __struct.type_mask =
5947            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
5948                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5949                    flag_type: "AttitudeTargetTypemask",
5950                    value: tmp as u64,
5951                })?;
5952        Ok(__struct)
5953    }
5954    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5955        let mut __tmp = BytesMut::new(bytes);
5956        #[allow(clippy::absurd_extreme_comparisons)]
5957        #[allow(unused_comparisons)]
5958        if __tmp.remaining() < Self::ENCODED_LEN {
5959            panic!(
5960                "buffer is too small (need {} bytes, but got {})",
5961                Self::ENCODED_LEN,
5962                __tmp.remaining(),
5963            )
5964        }
5965        __tmp.put_u32_le(self.time_boot_ms);
5966        for val in &self.q {
5967            __tmp.put_f32_le(*val);
5968        }
5969        __tmp.put_f32_le(self.body_roll_rate);
5970        __tmp.put_f32_le(self.body_pitch_rate);
5971        __tmp.put_f32_le(self.body_yaw_rate);
5972        __tmp.put_f32_le(self.thrust);
5973        __tmp.put_u8(self.type_mask.bits() as u8);
5974        if matches!(version, MavlinkVersion::V2) {
5975            let len = __tmp.len();
5976            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5977        } else {
5978            __tmp.len()
5979        }
5980    }
5981}
5982#[doc = "Motion capture attitude and position."]
5983#[doc = ""]
5984#[doc = "ID: 138"]
5985#[derive(Debug, Clone, PartialEq)]
5986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5988#[cfg_attr(feature = "ts", derive(TS))]
5989#[cfg_attr(feature = "ts", ts(export))]
5990pub struct ATT_POS_MOCAP_DATA {
5991    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5992    pub time_usec: u64,
5993    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5994    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5995    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5996    pub q: [f32; 4],
5997    #[doc = "X position (NED)"]
5998    pub x: f32,
5999    #[doc = "Y position (NED)"]
6000    pub y: f32,
6001    #[doc = "Z position (NED)"]
6002    pub z: f32,
6003    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
6004    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6005    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6006    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6007    pub covariance: [f32; 21],
6008}
6009impl ATT_POS_MOCAP_DATA {
6010    pub const ENCODED_LEN: usize = 120usize;
6011    pub const DEFAULT: Self = Self {
6012        time_usec: 0_u64,
6013        q: [0.0_f32; 4usize],
6014        x: 0.0_f32,
6015        y: 0.0_f32,
6016        z: 0.0_f32,
6017        covariance: [0.0_f32; 21usize],
6018    };
6019    #[cfg(feature = "arbitrary")]
6020    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6021        use arbitrary::{Arbitrary, Unstructured};
6022        let mut buf = [0u8; 1024];
6023        rng.fill_bytes(&mut buf);
6024        let mut unstructured = Unstructured::new(&buf);
6025        Self::arbitrary(&mut unstructured).unwrap_or_default()
6026    }
6027}
6028impl Default for ATT_POS_MOCAP_DATA {
6029    fn default() -> Self {
6030        Self::DEFAULT.clone()
6031    }
6032}
6033impl MessageData for ATT_POS_MOCAP_DATA {
6034    type Message = MavMessage;
6035    const ID: u32 = 138u32;
6036    const NAME: &'static str = "ATT_POS_MOCAP";
6037    const EXTRA_CRC: u8 = 109u8;
6038    const ENCODED_LEN: usize = 120usize;
6039    fn deser(
6040        _version: MavlinkVersion,
6041        __input: &[u8],
6042    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6043        let avail_len = __input.len();
6044        let mut payload_buf = [0; Self::ENCODED_LEN];
6045        let mut buf = if avail_len < Self::ENCODED_LEN {
6046            payload_buf[0..avail_len].copy_from_slice(__input);
6047            Bytes::new(&payload_buf)
6048        } else {
6049            Bytes::new(__input)
6050        };
6051        let mut __struct = Self::default();
6052        __struct.time_usec = buf.get_u64_le();
6053        for v in &mut __struct.q {
6054            let val = buf.get_f32_le();
6055            *v = val;
6056        }
6057        __struct.x = buf.get_f32_le();
6058        __struct.y = buf.get_f32_le();
6059        __struct.z = buf.get_f32_le();
6060        for v in &mut __struct.covariance {
6061            let val = buf.get_f32_le();
6062            *v = val;
6063        }
6064        Ok(__struct)
6065    }
6066    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6067        let mut __tmp = BytesMut::new(bytes);
6068        #[allow(clippy::absurd_extreme_comparisons)]
6069        #[allow(unused_comparisons)]
6070        if __tmp.remaining() < Self::ENCODED_LEN {
6071            panic!(
6072                "buffer is too small (need {} bytes, but got {})",
6073                Self::ENCODED_LEN,
6074                __tmp.remaining(),
6075            )
6076        }
6077        __tmp.put_u64_le(self.time_usec);
6078        for val in &self.q {
6079            __tmp.put_f32_le(*val);
6080        }
6081        __tmp.put_f32_le(self.x);
6082        __tmp.put_f32_le(self.y);
6083        __tmp.put_f32_le(self.z);
6084        if matches!(version, MavlinkVersion::V2) {
6085            for val in &self.covariance {
6086                __tmp.put_f32_le(*val);
6087            }
6088            let len = __tmp.len();
6089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6090        } else {
6091            __tmp.len()
6092        }
6093    }
6094}
6095#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
6096#[doc = ""]
6097#[doc = "ID: 7"]
6098#[derive(Debug, Clone, PartialEq)]
6099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6101#[cfg_attr(feature = "ts", derive(TS))]
6102#[cfg_attr(feature = "ts", ts(export))]
6103pub struct AUTH_KEY_DATA {
6104    #[doc = "key"]
6105    #[cfg_attr(feature = "ts", ts(type = "string"))]
6106    pub key: CharArray<32>,
6107}
6108impl AUTH_KEY_DATA {
6109    pub const ENCODED_LEN: usize = 32usize;
6110    pub const DEFAULT: Self = Self {
6111        key: CharArray::new([0_u8; 32usize]),
6112    };
6113    #[cfg(feature = "arbitrary")]
6114    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6115        use arbitrary::{Arbitrary, Unstructured};
6116        let mut buf = [0u8; 1024];
6117        rng.fill_bytes(&mut buf);
6118        let mut unstructured = Unstructured::new(&buf);
6119        Self::arbitrary(&mut unstructured).unwrap_or_default()
6120    }
6121}
6122impl Default for AUTH_KEY_DATA {
6123    fn default() -> Self {
6124        Self::DEFAULT.clone()
6125    }
6126}
6127impl MessageData for AUTH_KEY_DATA {
6128    type Message = MavMessage;
6129    const ID: u32 = 7u32;
6130    const NAME: &'static str = "AUTH_KEY";
6131    const EXTRA_CRC: u8 = 119u8;
6132    const ENCODED_LEN: usize = 32usize;
6133    fn deser(
6134        _version: MavlinkVersion,
6135        __input: &[u8],
6136    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6137        let avail_len = __input.len();
6138        let mut payload_buf = [0; Self::ENCODED_LEN];
6139        let mut buf = if avail_len < Self::ENCODED_LEN {
6140            payload_buf[0..avail_len].copy_from_slice(__input);
6141            Bytes::new(&payload_buf)
6142        } else {
6143            Bytes::new(__input)
6144        };
6145        let mut __struct = Self::default();
6146        let mut tmp = [0_u8; 32usize];
6147        for v in &mut tmp {
6148            *v = buf.get_u8();
6149        }
6150        __struct.key = CharArray::new(tmp);
6151        Ok(__struct)
6152    }
6153    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6154        let mut __tmp = BytesMut::new(bytes);
6155        #[allow(clippy::absurd_extreme_comparisons)]
6156        #[allow(unused_comparisons)]
6157        if __tmp.remaining() < Self::ENCODED_LEN {
6158            panic!(
6159                "buffer is too small (need {} bytes, but got {})",
6160                Self::ENCODED_LEN,
6161                __tmp.remaining(),
6162            )
6163        }
6164        for val in &self.key {
6165            __tmp.put_u8(*val);
6166        }
6167        if matches!(version, MavlinkVersion::V2) {
6168            let len = __tmp.len();
6169            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6170        } else {
6171            __tmp.len()
6172        }
6173    }
6174}
6175#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6176#[doc = ""]
6177#[doc = "ID: 286"]
6178#[derive(Debug, Clone, PartialEq)]
6179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6180#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6181#[cfg_attr(feature = "ts", derive(TS))]
6182#[cfg_attr(feature = "ts", ts(export))]
6183pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6184    #[doc = "Timestamp (time since system boot)."]
6185    pub time_boot_us: u64,
6186    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6187    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6188    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6189    pub q: [f32; 4],
6190    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6191    pub q_estimated_delay_us: u32,
6192    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6193    pub vx: f32,
6194    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6195    pub vy: f32,
6196    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6197    pub vz: f32,
6198    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6199    pub v_estimated_delay_us: u32,
6200    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6201    pub feed_forward_angular_velocity_z: f32,
6202    #[doc = "Bitmap indicating which estimator outputs are valid."]
6203    pub estimator_status: EstimatorStatusFlags,
6204    #[doc = "System ID"]
6205    pub target_system: u8,
6206    #[doc = "Component ID"]
6207    pub target_component: u8,
6208    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6209    pub landed_state: MavLandedState,
6210    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6211    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6212    pub angular_velocity_z: f32,
6213}
6214impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6215    pub const ENCODED_LEN: usize = 57usize;
6216    pub const DEFAULT: Self = Self {
6217        time_boot_us: 0_u64,
6218        q: [0.0_f32; 4usize],
6219        q_estimated_delay_us: 0_u32,
6220        vx: 0.0_f32,
6221        vy: 0.0_f32,
6222        vz: 0.0_f32,
6223        v_estimated_delay_us: 0_u32,
6224        feed_forward_angular_velocity_z: 0.0_f32,
6225        estimator_status: EstimatorStatusFlags::DEFAULT,
6226        target_system: 0_u8,
6227        target_component: 0_u8,
6228        landed_state: MavLandedState::DEFAULT,
6229        angular_velocity_z: 0.0_f32,
6230    };
6231    #[cfg(feature = "arbitrary")]
6232    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6233        use arbitrary::{Arbitrary, Unstructured};
6234        let mut buf = [0u8; 1024];
6235        rng.fill_bytes(&mut buf);
6236        let mut unstructured = Unstructured::new(&buf);
6237        Self::arbitrary(&mut unstructured).unwrap_or_default()
6238    }
6239}
6240impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6241    fn default() -> Self {
6242        Self::DEFAULT.clone()
6243    }
6244}
6245impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6246    type Message = MavMessage;
6247    const ID: u32 = 286u32;
6248    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6249    const EXTRA_CRC: u8 = 210u8;
6250    const ENCODED_LEN: usize = 57usize;
6251    fn deser(
6252        _version: MavlinkVersion,
6253        __input: &[u8],
6254    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6255        let avail_len = __input.len();
6256        let mut payload_buf = [0; Self::ENCODED_LEN];
6257        let mut buf = if avail_len < Self::ENCODED_LEN {
6258            payload_buf[0..avail_len].copy_from_slice(__input);
6259            Bytes::new(&payload_buf)
6260        } else {
6261            Bytes::new(__input)
6262        };
6263        let mut __struct = Self::default();
6264        __struct.time_boot_us = buf.get_u64_le();
6265        for v in &mut __struct.q {
6266            let val = buf.get_f32_le();
6267            *v = val;
6268        }
6269        __struct.q_estimated_delay_us = buf.get_u32_le();
6270        __struct.vx = buf.get_f32_le();
6271        __struct.vy = buf.get_f32_le();
6272        __struct.vz = buf.get_f32_le();
6273        __struct.v_estimated_delay_us = buf.get_u32_le();
6274        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6275        let tmp = buf.get_u16_le();
6276        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6277            tmp as <EstimatorStatusFlags as Flags>::Bits,
6278        )
6279        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6280            flag_type: "EstimatorStatusFlags",
6281            value: tmp as u64,
6282        })?;
6283        __struct.target_system = buf.get_u8();
6284        __struct.target_component = buf.get_u8();
6285        let tmp = buf.get_u8();
6286        __struct.landed_state =
6287            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6288                enum_type: "MavLandedState",
6289                value: tmp as u64,
6290            })?;
6291        __struct.angular_velocity_z = buf.get_f32_le();
6292        Ok(__struct)
6293    }
6294    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6295        let mut __tmp = BytesMut::new(bytes);
6296        #[allow(clippy::absurd_extreme_comparisons)]
6297        #[allow(unused_comparisons)]
6298        if __tmp.remaining() < Self::ENCODED_LEN {
6299            panic!(
6300                "buffer is too small (need {} bytes, but got {})",
6301                Self::ENCODED_LEN,
6302                __tmp.remaining(),
6303            )
6304        }
6305        __tmp.put_u64_le(self.time_boot_us);
6306        for val in &self.q {
6307            __tmp.put_f32_le(*val);
6308        }
6309        __tmp.put_u32_le(self.q_estimated_delay_us);
6310        __tmp.put_f32_le(self.vx);
6311        __tmp.put_f32_le(self.vy);
6312        __tmp.put_f32_le(self.vz);
6313        __tmp.put_u32_le(self.v_estimated_delay_us);
6314        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6315        __tmp.put_u16_le(self.estimator_status.bits() as u16);
6316        __tmp.put_u8(self.target_system);
6317        __tmp.put_u8(self.target_component);
6318        __tmp.put_u8(self.landed_state as u8);
6319        if matches!(version, MavlinkVersion::V2) {
6320            __tmp.put_f32_le(self.angular_velocity_z);
6321            let len = __tmp.len();
6322            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6323        } else {
6324            __tmp.len()
6325        }
6326    }
6327}
6328#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6329#[doc = ""]
6330#[doc = "ID: 148"]
6331#[derive(Debug, Clone, PartialEq)]
6332#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6333#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6334#[cfg_attr(feature = "ts", derive(TS))]
6335#[cfg_attr(feature = "ts", ts(export))]
6336pub struct AUTOPILOT_VERSION_DATA {
6337    #[doc = "Bitmap of capabilities"]
6338    pub capabilities: MavProtocolCapability,
6339    #[doc = "UID if provided by hardware (see uid2)"]
6340    pub uid: u64,
6341    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6342    pub flight_sw_version: u32,
6343    #[doc = "Middleware version number"]
6344    pub middleware_sw_version: u32,
6345    #[doc = "Operating system version number"]
6346    pub os_sw_version: u32,
6347    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6348    pub board_version: u32,
6349    #[doc = "ID of the board vendor"]
6350    pub vendor_id: u16,
6351    #[doc = "ID of the product"]
6352    pub product_id: u16,
6353    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6354    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6355    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6356    pub flight_custom_version: [u8; 8],
6357    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6358    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6359    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6360    pub middleware_custom_version: [u8; 8],
6361    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6362    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6363    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6364    pub os_custom_version: [u8; 8],
6365    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6366    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6367    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6368    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6369    pub uid2: [u8; 18],
6370}
6371impl AUTOPILOT_VERSION_DATA {
6372    pub const ENCODED_LEN: usize = 78usize;
6373    pub const DEFAULT: Self = Self {
6374        capabilities: MavProtocolCapability::DEFAULT,
6375        uid: 0_u64,
6376        flight_sw_version: 0_u32,
6377        middleware_sw_version: 0_u32,
6378        os_sw_version: 0_u32,
6379        board_version: 0_u32,
6380        vendor_id: 0_u16,
6381        product_id: 0_u16,
6382        flight_custom_version: [0_u8; 8usize],
6383        middleware_custom_version: [0_u8; 8usize],
6384        os_custom_version: [0_u8; 8usize],
6385        uid2: [0_u8; 18usize],
6386    };
6387    #[cfg(feature = "arbitrary")]
6388    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6389        use arbitrary::{Arbitrary, Unstructured};
6390        let mut buf = [0u8; 1024];
6391        rng.fill_bytes(&mut buf);
6392        let mut unstructured = Unstructured::new(&buf);
6393        Self::arbitrary(&mut unstructured).unwrap_or_default()
6394    }
6395}
6396impl Default for AUTOPILOT_VERSION_DATA {
6397    fn default() -> Self {
6398        Self::DEFAULT.clone()
6399    }
6400}
6401impl MessageData for AUTOPILOT_VERSION_DATA {
6402    type Message = MavMessage;
6403    const ID: u32 = 148u32;
6404    const NAME: &'static str = "AUTOPILOT_VERSION";
6405    const EXTRA_CRC: u8 = 178u8;
6406    const ENCODED_LEN: usize = 78usize;
6407    fn deser(
6408        _version: MavlinkVersion,
6409        __input: &[u8],
6410    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6411        let avail_len = __input.len();
6412        let mut payload_buf = [0; Self::ENCODED_LEN];
6413        let mut buf = if avail_len < Self::ENCODED_LEN {
6414            payload_buf[0..avail_len].copy_from_slice(__input);
6415            Bytes::new(&payload_buf)
6416        } else {
6417            Bytes::new(__input)
6418        };
6419        let mut __struct = Self::default();
6420        let tmp = buf.get_u64_le();
6421        __struct.capabilities = MavProtocolCapability::from_bits(
6422            tmp as <MavProtocolCapability as Flags>::Bits,
6423        )
6424        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6425            flag_type: "MavProtocolCapability",
6426            value: tmp as u64,
6427        })?;
6428        __struct.uid = buf.get_u64_le();
6429        __struct.flight_sw_version = buf.get_u32_le();
6430        __struct.middleware_sw_version = buf.get_u32_le();
6431        __struct.os_sw_version = buf.get_u32_le();
6432        __struct.board_version = buf.get_u32_le();
6433        __struct.vendor_id = buf.get_u16_le();
6434        __struct.product_id = buf.get_u16_le();
6435        for v in &mut __struct.flight_custom_version {
6436            let val = buf.get_u8();
6437            *v = val;
6438        }
6439        for v in &mut __struct.middleware_custom_version {
6440            let val = buf.get_u8();
6441            *v = val;
6442        }
6443        for v in &mut __struct.os_custom_version {
6444            let val = buf.get_u8();
6445            *v = val;
6446        }
6447        for v in &mut __struct.uid2 {
6448            let val = buf.get_u8();
6449            *v = val;
6450        }
6451        Ok(__struct)
6452    }
6453    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6454        let mut __tmp = BytesMut::new(bytes);
6455        #[allow(clippy::absurd_extreme_comparisons)]
6456        #[allow(unused_comparisons)]
6457        if __tmp.remaining() < Self::ENCODED_LEN {
6458            panic!(
6459                "buffer is too small (need {} bytes, but got {})",
6460                Self::ENCODED_LEN,
6461                __tmp.remaining(),
6462            )
6463        }
6464        __tmp.put_u64_le(self.capabilities.bits() as u64);
6465        __tmp.put_u64_le(self.uid);
6466        __tmp.put_u32_le(self.flight_sw_version);
6467        __tmp.put_u32_le(self.middleware_sw_version);
6468        __tmp.put_u32_le(self.os_sw_version);
6469        __tmp.put_u32_le(self.board_version);
6470        __tmp.put_u16_le(self.vendor_id);
6471        __tmp.put_u16_le(self.product_id);
6472        for val in &self.flight_custom_version {
6473            __tmp.put_u8(*val);
6474        }
6475        for val in &self.middleware_custom_version {
6476            __tmp.put_u8(*val);
6477        }
6478        for val in &self.os_custom_version {
6479            __tmp.put_u8(*val);
6480        }
6481        if matches!(version, MavlinkVersion::V2) {
6482            for val in &self.uid2 {
6483                __tmp.put_u8(*val);
6484            }
6485            let len = __tmp.len();
6486            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6487        } else {
6488            __tmp.len()
6489        }
6490    }
6491}
6492#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6493#[doc = ""]
6494#[doc = "ID: 435"]
6495#[derive(Debug, Clone, PartialEq)]
6496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6498#[cfg_attr(feature = "ts", derive(TS))]
6499#[cfg_attr(feature = "ts", ts(export))]
6500pub struct AVAILABLE_MODES_DATA {
6501    #[doc = "A bitfield for use for autopilot-specific flags"]
6502    pub custom_mode: u32,
6503    #[doc = "Mode properties."]
6504    pub properties: MavModeProperty,
6505    #[doc = "The total number of available modes for the current vehicle type."]
6506    pub number_modes: u8,
6507    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6508    pub mode_index: u8,
6509    #[doc = "Standard mode."]
6510    pub standard_mode: MavStandardMode,
6511    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6512    #[cfg_attr(feature = "ts", ts(type = "string"))]
6513    pub mode_name: CharArray<35>,
6514}
6515impl AVAILABLE_MODES_DATA {
6516    pub const ENCODED_LEN: usize = 46usize;
6517    pub const DEFAULT: Self = Self {
6518        custom_mode: 0_u32,
6519        properties: MavModeProperty::DEFAULT,
6520        number_modes: 0_u8,
6521        mode_index: 0_u8,
6522        standard_mode: MavStandardMode::DEFAULT,
6523        mode_name: CharArray::new([0_u8; 35usize]),
6524    };
6525    #[cfg(feature = "arbitrary")]
6526    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6527        use arbitrary::{Arbitrary, Unstructured};
6528        let mut buf = [0u8; 1024];
6529        rng.fill_bytes(&mut buf);
6530        let mut unstructured = Unstructured::new(&buf);
6531        Self::arbitrary(&mut unstructured).unwrap_or_default()
6532    }
6533}
6534impl Default for AVAILABLE_MODES_DATA {
6535    fn default() -> Self {
6536        Self::DEFAULT.clone()
6537    }
6538}
6539impl MessageData for AVAILABLE_MODES_DATA {
6540    type Message = MavMessage;
6541    const ID: u32 = 435u32;
6542    const NAME: &'static str = "AVAILABLE_MODES";
6543    const EXTRA_CRC: u8 = 134u8;
6544    const ENCODED_LEN: usize = 46usize;
6545    fn deser(
6546        _version: MavlinkVersion,
6547        __input: &[u8],
6548    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6549        let avail_len = __input.len();
6550        let mut payload_buf = [0; Self::ENCODED_LEN];
6551        let mut buf = if avail_len < Self::ENCODED_LEN {
6552            payload_buf[0..avail_len].copy_from_slice(__input);
6553            Bytes::new(&payload_buf)
6554        } else {
6555            Bytes::new(__input)
6556        };
6557        let mut __struct = Self::default();
6558        __struct.custom_mode = buf.get_u32_le();
6559        let tmp = buf.get_u32_le();
6560        __struct.properties = MavModeProperty::from_bits(tmp as <MavModeProperty as Flags>::Bits)
6561            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6562            flag_type: "MavModeProperty",
6563            value: tmp as u64,
6564        })?;
6565        __struct.number_modes = buf.get_u8();
6566        __struct.mode_index = buf.get_u8();
6567        let tmp = buf.get_u8();
6568        __struct.standard_mode =
6569            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6570                enum_type: "MavStandardMode",
6571                value: tmp as u64,
6572            })?;
6573        let mut tmp = [0_u8; 35usize];
6574        for v in &mut tmp {
6575            *v = buf.get_u8();
6576        }
6577        __struct.mode_name = CharArray::new(tmp);
6578        Ok(__struct)
6579    }
6580    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6581        let mut __tmp = BytesMut::new(bytes);
6582        #[allow(clippy::absurd_extreme_comparisons)]
6583        #[allow(unused_comparisons)]
6584        if __tmp.remaining() < Self::ENCODED_LEN {
6585            panic!(
6586                "buffer is too small (need {} bytes, but got {})",
6587                Self::ENCODED_LEN,
6588                __tmp.remaining(),
6589            )
6590        }
6591        __tmp.put_u32_le(self.custom_mode);
6592        __tmp.put_u32_le(self.properties.bits() as u32);
6593        __tmp.put_u8(self.number_modes);
6594        __tmp.put_u8(self.mode_index);
6595        __tmp.put_u8(self.standard_mode as u8);
6596        for val in &self.mode_name {
6597            __tmp.put_u8(*val);
6598        }
6599        if matches!(version, MavlinkVersion::V2) {
6600            let len = __tmp.len();
6601            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6602        } else {
6603            __tmp.len()
6604        }
6605    }
6606}
6607#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6608#[doc = ""]
6609#[doc = "ID: 437"]
6610#[derive(Debug, Clone, PartialEq)]
6611#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6612#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6613#[cfg_attr(feature = "ts", derive(TS))]
6614#[cfg_attr(feature = "ts", ts(export))]
6615pub struct AVAILABLE_MODES_MONITOR_DATA {
6616    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6617    pub seq: u8,
6618}
6619impl AVAILABLE_MODES_MONITOR_DATA {
6620    pub const ENCODED_LEN: usize = 1usize;
6621    pub const DEFAULT: Self = Self { seq: 0_u8 };
6622    #[cfg(feature = "arbitrary")]
6623    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6624        use arbitrary::{Arbitrary, Unstructured};
6625        let mut buf = [0u8; 1024];
6626        rng.fill_bytes(&mut buf);
6627        let mut unstructured = Unstructured::new(&buf);
6628        Self::arbitrary(&mut unstructured).unwrap_or_default()
6629    }
6630}
6631impl Default for AVAILABLE_MODES_MONITOR_DATA {
6632    fn default() -> Self {
6633        Self::DEFAULT.clone()
6634    }
6635}
6636impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6637    type Message = MavMessage;
6638    const ID: u32 = 437u32;
6639    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6640    const EXTRA_CRC: u8 = 30u8;
6641    const ENCODED_LEN: usize = 1usize;
6642    fn deser(
6643        _version: MavlinkVersion,
6644        __input: &[u8],
6645    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6646        let avail_len = __input.len();
6647        let mut payload_buf = [0; Self::ENCODED_LEN];
6648        let mut buf = if avail_len < Self::ENCODED_LEN {
6649            payload_buf[0..avail_len].copy_from_slice(__input);
6650            Bytes::new(&payload_buf)
6651        } else {
6652            Bytes::new(__input)
6653        };
6654        let mut __struct = Self::default();
6655        __struct.seq = buf.get_u8();
6656        Ok(__struct)
6657    }
6658    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6659        let mut __tmp = BytesMut::new(bytes);
6660        #[allow(clippy::absurd_extreme_comparisons)]
6661        #[allow(unused_comparisons)]
6662        if __tmp.remaining() < Self::ENCODED_LEN {
6663            panic!(
6664                "buffer is too small (need {} bytes, but got {})",
6665                Self::ENCODED_LEN,
6666                __tmp.remaining(),
6667            )
6668        }
6669        __tmp.put_u8(self.seq);
6670        if matches!(version, MavlinkVersion::V2) {
6671            let len = __tmp.len();
6672            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6673        } else {
6674            __tmp.len()
6675        }
6676    }
6677}
6678#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6679#[doc = ""]
6680#[doc = "ID: 372"]
6681#[derive(Debug, Clone, PartialEq)]
6682#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6683#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6684#[cfg_attr(feature = "ts", derive(TS))]
6685#[cfg_attr(feature = "ts", ts(export))]
6686pub struct BATTERY_INFO_DATA {
6687    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6688    pub discharge_minimum_voltage: f32,
6689    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6690    pub charging_minimum_voltage: f32,
6691    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6692    pub resting_minimum_voltage: f32,
6693    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6694    pub charging_maximum_voltage: f32,
6695    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6696    pub charging_maximum_current: f32,
6697    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6698    pub nominal_voltage: f32,
6699    #[doc = "Maximum pack discharge current. 0: field not provided."]
6700    pub discharge_maximum_current: f32,
6701    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6702    pub discharge_maximum_burst_current: f32,
6703    #[doc = "Fully charged design capacity. 0: field not provided."]
6704    pub design_capacity: f32,
6705    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6706    pub full_charge_capacity: f32,
6707    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6708    pub cycle_count: u16,
6709    #[doc = "Battery weight. 0: field not provided."]
6710    pub weight: u16,
6711    #[doc = "Battery ID"]
6712    pub id: u8,
6713    #[doc = "Function of the battery."]
6714    pub battery_function: MavBatteryFunction,
6715    #[doc = "Type (chemistry) of the battery."]
6716    pub mavtype: MavBatteryType,
6717    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6718    pub state_of_health: u8,
6719    #[doc = "Number of battery cells in series. 0: field not provided."]
6720    pub cells_in_series: u8,
6721    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6722    #[cfg_attr(feature = "ts", ts(type = "string"))]
6723    pub manufacture_date: CharArray<9>,
6724    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6725    #[cfg_attr(feature = "ts", ts(type = "string"))]
6726    pub serial_number: CharArray<32>,
6727    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6728    #[cfg_attr(feature = "ts", ts(type = "string"))]
6729    pub name: CharArray<50>,
6730}
6731impl BATTERY_INFO_DATA {
6732    pub const ENCODED_LEN: usize = 140usize;
6733    pub const DEFAULT: Self = Self {
6734        discharge_minimum_voltage: 0.0_f32,
6735        charging_minimum_voltage: 0.0_f32,
6736        resting_minimum_voltage: 0.0_f32,
6737        charging_maximum_voltage: 0.0_f32,
6738        charging_maximum_current: 0.0_f32,
6739        nominal_voltage: 0.0_f32,
6740        discharge_maximum_current: 0.0_f32,
6741        discharge_maximum_burst_current: 0.0_f32,
6742        design_capacity: 0.0_f32,
6743        full_charge_capacity: 0.0_f32,
6744        cycle_count: 0_u16,
6745        weight: 0_u16,
6746        id: 0_u8,
6747        battery_function: MavBatteryFunction::DEFAULT,
6748        mavtype: MavBatteryType::DEFAULT,
6749        state_of_health: 0_u8,
6750        cells_in_series: 0_u8,
6751        manufacture_date: CharArray::new([0_u8; 9usize]),
6752        serial_number: CharArray::new([0_u8; 32usize]),
6753        name: CharArray::new([0_u8; 50usize]),
6754    };
6755    #[cfg(feature = "arbitrary")]
6756    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6757        use arbitrary::{Arbitrary, Unstructured};
6758        let mut buf = [0u8; 1024];
6759        rng.fill_bytes(&mut buf);
6760        let mut unstructured = Unstructured::new(&buf);
6761        Self::arbitrary(&mut unstructured).unwrap_or_default()
6762    }
6763}
6764impl Default for BATTERY_INFO_DATA {
6765    fn default() -> Self {
6766        Self::DEFAULT.clone()
6767    }
6768}
6769impl MessageData for BATTERY_INFO_DATA {
6770    type Message = MavMessage;
6771    const ID: u32 = 372u32;
6772    const NAME: &'static str = "BATTERY_INFO";
6773    const EXTRA_CRC: u8 = 26u8;
6774    const ENCODED_LEN: usize = 140usize;
6775    fn deser(
6776        _version: MavlinkVersion,
6777        __input: &[u8],
6778    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6779        let avail_len = __input.len();
6780        let mut payload_buf = [0; Self::ENCODED_LEN];
6781        let mut buf = if avail_len < Self::ENCODED_LEN {
6782            payload_buf[0..avail_len].copy_from_slice(__input);
6783            Bytes::new(&payload_buf)
6784        } else {
6785            Bytes::new(__input)
6786        };
6787        let mut __struct = Self::default();
6788        __struct.discharge_minimum_voltage = buf.get_f32_le();
6789        __struct.charging_minimum_voltage = buf.get_f32_le();
6790        __struct.resting_minimum_voltage = buf.get_f32_le();
6791        __struct.charging_maximum_voltage = buf.get_f32_le();
6792        __struct.charging_maximum_current = buf.get_f32_le();
6793        __struct.nominal_voltage = buf.get_f32_le();
6794        __struct.discharge_maximum_current = buf.get_f32_le();
6795        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6796        __struct.design_capacity = buf.get_f32_le();
6797        __struct.full_charge_capacity = buf.get_f32_le();
6798        __struct.cycle_count = buf.get_u16_le();
6799        __struct.weight = buf.get_u16_le();
6800        __struct.id = buf.get_u8();
6801        let tmp = buf.get_u8();
6802        __struct.battery_function =
6803            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6804                enum_type: "MavBatteryFunction",
6805                value: tmp as u64,
6806            })?;
6807        let tmp = buf.get_u8();
6808        __struct.mavtype =
6809            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6810                enum_type: "MavBatteryType",
6811                value: tmp as u64,
6812            })?;
6813        __struct.state_of_health = buf.get_u8();
6814        __struct.cells_in_series = buf.get_u8();
6815        let mut tmp = [0_u8; 9usize];
6816        for v in &mut tmp {
6817            *v = buf.get_u8();
6818        }
6819        __struct.manufacture_date = CharArray::new(tmp);
6820        let mut tmp = [0_u8; 32usize];
6821        for v in &mut tmp {
6822            *v = buf.get_u8();
6823        }
6824        __struct.serial_number = CharArray::new(tmp);
6825        let mut tmp = [0_u8; 50usize];
6826        for v in &mut tmp {
6827            *v = buf.get_u8();
6828        }
6829        __struct.name = CharArray::new(tmp);
6830        Ok(__struct)
6831    }
6832    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6833        let mut __tmp = BytesMut::new(bytes);
6834        #[allow(clippy::absurd_extreme_comparisons)]
6835        #[allow(unused_comparisons)]
6836        if __tmp.remaining() < Self::ENCODED_LEN {
6837            panic!(
6838                "buffer is too small (need {} bytes, but got {})",
6839                Self::ENCODED_LEN,
6840                __tmp.remaining(),
6841            )
6842        }
6843        __tmp.put_f32_le(self.discharge_minimum_voltage);
6844        __tmp.put_f32_le(self.charging_minimum_voltage);
6845        __tmp.put_f32_le(self.resting_minimum_voltage);
6846        __tmp.put_f32_le(self.charging_maximum_voltage);
6847        __tmp.put_f32_le(self.charging_maximum_current);
6848        __tmp.put_f32_le(self.nominal_voltage);
6849        __tmp.put_f32_le(self.discharge_maximum_current);
6850        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6851        __tmp.put_f32_le(self.design_capacity);
6852        __tmp.put_f32_le(self.full_charge_capacity);
6853        __tmp.put_u16_le(self.cycle_count);
6854        __tmp.put_u16_le(self.weight);
6855        __tmp.put_u8(self.id);
6856        __tmp.put_u8(self.battery_function as u8);
6857        __tmp.put_u8(self.mavtype as u8);
6858        __tmp.put_u8(self.state_of_health);
6859        __tmp.put_u8(self.cells_in_series);
6860        for val in &self.manufacture_date {
6861            __tmp.put_u8(*val);
6862        }
6863        for val in &self.serial_number {
6864            __tmp.put_u8(*val);
6865        }
6866        for val in &self.name {
6867            __tmp.put_u8(*val);
6868        }
6869        if matches!(version, MavlinkVersion::V2) {
6870            let len = __tmp.len();
6871            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6872        } else {
6873            __tmp.len()
6874        }
6875    }
6876}
6877#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6878#[doc = ""]
6879#[doc = "ID: 147"]
6880#[derive(Debug, Clone, PartialEq)]
6881#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6882#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6883#[cfg_attr(feature = "ts", derive(TS))]
6884#[cfg_attr(feature = "ts", ts(export))]
6885pub struct BATTERY_STATUS_DATA {
6886    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6887    pub current_consumed: i32,
6888    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6889    pub energy_consumed: i32,
6890    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6891    pub temperature: i16,
6892    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6893    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6894    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6895    pub voltages: [u16; 10],
6896    #[doc = "Battery current, -1: autopilot does not measure the current"]
6897    pub current_battery: i16,
6898    #[doc = "Battery ID"]
6899    pub id: u8,
6900    #[doc = "Function of the battery"]
6901    pub battery_function: MavBatteryFunction,
6902    #[doc = "Type (chemistry) of the battery"]
6903    pub mavtype: MavBatteryType,
6904    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6905    pub battery_remaining: i8,
6906    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6907    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6908    pub time_remaining: i32,
6909    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6910    #[cfg_attr(feature = "serde", serde(default))]
6911    pub charge_state: MavBatteryChargeState,
6912    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6913    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6914    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6915    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6916    pub voltages_ext: [u16; 4],
6917    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6918    #[cfg_attr(feature = "serde", serde(default))]
6919    pub mode: MavBatteryMode,
6920    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6921    #[cfg_attr(feature = "serde", serde(default))]
6922    pub fault_bitmask: MavBatteryFault,
6923}
6924impl BATTERY_STATUS_DATA {
6925    pub const ENCODED_LEN: usize = 54usize;
6926    pub const DEFAULT: Self = Self {
6927        current_consumed: 0_i32,
6928        energy_consumed: 0_i32,
6929        temperature: 0_i16,
6930        voltages: [0_u16; 10usize],
6931        current_battery: 0_i16,
6932        id: 0_u8,
6933        battery_function: MavBatteryFunction::DEFAULT,
6934        mavtype: MavBatteryType::DEFAULT,
6935        battery_remaining: 0_i8,
6936        time_remaining: 0_i32,
6937        charge_state: MavBatteryChargeState::DEFAULT,
6938        voltages_ext: [0_u16; 4usize],
6939        mode: MavBatteryMode::DEFAULT,
6940        fault_bitmask: MavBatteryFault::DEFAULT,
6941    };
6942    #[cfg(feature = "arbitrary")]
6943    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6944        use arbitrary::{Arbitrary, Unstructured};
6945        let mut buf = [0u8; 1024];
6946        rng.fill_bytes(&mut buf);
6947        let mut unstructured = Unstructured::new(&buf);
6948        Self::arbitrary(&mut unstructured).unwrap_or_default()
6949    }
6950}
6951impl Default for BATTERY_STATUS_DATA {
6952    fn default() -> Self {
6953        Self::DEFAULT.clone()
6954    }
6955}
6956impl MessageData for BATTERY_STATUS_DATA {
6957    type Message = MavMessage;
6958    const ID: u32 = 147u32;
6959    const NAME: &'static str = "BATTERY_STATUS";
6960    const EXTRA_CRC: u8 = 154u8;
6961    const ENCODED_LEN: usize = 54usize;
6962    fn deser(
6963        _version: MavlinkVersion,
6964        __input: &[u8],
6965    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6966        let avail_len = __input.len();
6967        let mut payload_buf = [0; Self::ENCODED_LEN];
6968        let mut buf = if avail_len < Self::ENCODED_LEN {
6969            payload_buf[0..avail_len].copy_from_slice(__input);
6970            Bytes::new(&payload_buf)
6971        } else {
6972            Bytes::new(__input)
6973        };
6974        let mut __struct = Self::default();
6975        __struct.current_consumed = buf.get_i32_le();
6976        __struct.energy_consumed = buf.get_i32_le();
6977        __struct.temperature = buf.get_i16_le();
6978        for v in &mut __struct.voltages {
6979            let val = buf.get_u16_le();
6980            *v = val;
6981        }
6982        __struct.current_battery = buf.get_i16_le();
6983        __struct.id = buf.get_u8();
6984        let tmp = buf.get_u8();
6985        __struct.battery_function =
6986            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6987                enum_type: "MavBatteryFunction",
6988                value: tmp as u64,
6989            })?;
6990        let tmp = buf.get_u8();
6991        __struct.mavtype =
6992            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6993                enum_type: "MavBatteryType",
6994                value: tmp as u64,
6995            })?;
6996        __struct.battery_remaining = buf.get_i8();
6997        __struct.time_remaining = buf.get_i32_le();
6998        let tmp = buf.get_u8();
6999        __struct.charge_state =
7000            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7001                enum_type: "MavBatteryChargeState",
7002                value: tmp as u64,
7003            })?;
7004        for v in &mut __struct.voltages_ext {
7005            let val = buf.get_u16_le();
7006            *v = val;
7007        }
7008        let tmp = buf.get_u8();
7009        __struct.mode =
7010            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7011                enum_type: "MavBatteryMode",
7012                value: tmp as u64,
7013            })?;
7014        let tmp = buf.get_u32_le();
7015        __struct.fault_bitmask = MavBatteryFault::from_bits(
7016            tmp as <MavBatteryFault as Flags>::Bits,
7017        )
7018        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7019            flag_type: "MavBatteryFault",
7020            value: tmp as u64,
7021        })?;
7022        Ok(__struct)
7023    }
7024    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7025        let mut __tmp = BytesMut::new(bytes);
7026        #[allow(clippy::absurd_extreme_comparisons)]
7027        #[allow(unused_comparisons)]
7028        if __tmp.remaining() < Self::ENCODED_LEN {
7029            panic!(
7030                "buffer is too small (need {} bytes, but got {})",
7031                Self::ENCODED_LEN,
7032                __tmp.remaining(),
7033            )
7034        }
7035        __tmp.put_i32_le(self.current_consumed);
7036        __tmp.put_i32_le(self.energy_consumed);
7037        __tmp.put_i16_le(self.temperature);
7038        for val in &self.voltages {
7039            __tmp.put_u16_le(*val);
7040        }
7041        __tmp.put_i16_le(self.current_battery);
7042        __tmp.put_u8(self.id);
7043        __tmp.put_u8(self.battery_function as u8);
7044        __tmp.put_u8(self.mavtype as u8);
7045        __tmp.put_i8(self.battery_remaining);
7046        if matches!(version, MavlinkVersion::V2) {
7047            __tmp.put_i32_le(self.time_remaining);
7048            __tmp.put_u8(self.charge_state as u8);
7049            for val in &self.voltages_ext {
7050                __tmp.put_u16_le(*val);
7051            }
7052            __tmp.put_u8(self.mode as u8);
7053            __tmp.put_u32_le(self.fault_bitmask.bits() as u32);
7054            let len = __tmp.len();
7055            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7056        } else {
7057            __tmp.len()
7058        }
7059    }
7060}
7061#[doc = "Report button state change."]
7062#[doc = ""]
7063#[doc = "ID: 257"]
7064#[derive(Debug, Clone, PartialEq)]
7065#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7066#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7067#[cfg_attr(feature = "ts", derive(TS))]
7068#[cfg_attr(feature = "ts", ts(export))]
7069pub struct BUTTON_CHANGE_DATA {
7070    #[doc = "Timestamp (time since system boot)."]
7071    pub time_boot_ms: u32,
7072    #[doc = "Time of last change of button state."]
7073    pub last_change_ms: u32,
7074    #[doc = "Bitmap for state of buttons."]
7075    pub state: u8,
7076}
7077impl BUTTON_CHANGE_DATA {
7078    pub const ENCODED_LEN: usize = 9usize;
7079    pub const DEFAULT: Self = Self {
7080        time_boot_ms: 0_u32,
7081        last_change_ms: 0_u32,
7082        state: 0_u8,
7083    };
7084    #[cfg(feature = "arbitrary")]
7085    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7086        use arbitrary::{Arbitrary, Unstructured};
7087        let mut buf = [0u8; 1024];
7088        rng.fill_bytes(&mut buf);
7089        let mut unstructured = Unstructured::new(&buf);
7090        Self::arbitrary(&mut unstructured).unwrap_or_default()
7091    }
7092}
7093impl Default for BUTTON_CHANGE_DATA {
7094    fn default() -> Self {
7095        Self::DEFAULT.clone()
7096    }
7097}
7098impl MessageData for BUTTON_CHANGE_DATA {
7099    type Message = MavMessage;
7100    const ID: u32 = 257u32;
7101    const NAME: &'static str = "BUTTON_CHANGE";
7102    const EXTRA_CRC: u8 = 131u8;
7103    const ENCODED_LEN: usize = 9usize;
7104    fn deser(
7105        _version: MavlinkVersion,
7106        __input: &[u8],
7107    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7108        let avail_len = __input.len();
7109        let mut payload_buf = [0; Self::ENCODED_LEN];
7110        let mut buf = if avail_len < Self::ENCODED_LEN {
7111            payload_buf[0..avail_len].copy_from_slice(__input);
7112            Bytes::new(&payload_buf)
7113        } else {
7114            Bytes::new(__input)
7115        };
7116        let mut __struct = Self::default();
7117        __struct.time_boot_ms = buf.get_u32_le();
7118        __struct.last_change_ms = buf.get_u32_le();
7119        __struct.state = buf.get_u8();
7120        Ok(__struct)
7121    }
7122    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7123        let mut __tmp = BytesMut::new(bytes);
7124        #[allow(clippy::absurd_extreme_comparisons)]
7125        #[allow(unused_comparisons)]
7126        if __tmp.remaining() < Self::ENCODED_LEN {
7127            panic!(
7128                "buffer is too small (need {} bytes, but got {})",
7129                Self::ENCODED_LEN,
7130                __tmp.remaining(),
7131            )
7132        }
7133        __tmp.put_u32_le(self.time_boot_ms);
7134        __tmp.put_u32_le(self.last_change_ms);
7135        __tmp.put_u8(self.state);
7136        if matches!(version, MavlinkVersion::V2) {
7137            let len = __tmp.len();
7138            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7139        } else {
7140            __tmp.len()
7141        }
7142    }
7143}
7144#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7145#[doc = ""]
7146#[doc = "ID: 262"]
7147#[derive(Debug, Clone, PartialEq)]
7148#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7149#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7150#[cfg_attr(feature = "ts", derive(TS))]
7151#[cfg_attr(feature = "ts", ts(export))]
7152pub struct CAMERA_CAPTURE_STATUS_DATA {
7153    #[doc = "Timestamp (time since system boot)."]
7154    pub time_boot_ms: u32,
7155    #[doc = "Image capture interval"]
7156    pub image_interval: f32,
7157    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7158    pub recording_time_ms: u32,
7159    #[doc = "Available storage capacity."]
7160    pub available_capacity: f32,
7161    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7162    pub image_status: u8,
7163    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7164    pub video_status: u8,
7165    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7166    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7167    pub image_count: i32,
7168    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7169    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7170    pub camera_device_id: u8,
7171}
7172impl CAMERA_CAPTURE_STATUS_DATA {
7173    pub const ENCODED_LEN: usize = 23usize;
7174    pub const DEFAULT: Self = Self {
7175        time_boot_ms: 0_u32,
7176        image_interval: 0.0_f32,
7177        recording_time_ms: 0_u32,
7178        available_capacity: 0.0_f32,
7179        image_status: 0_u8,
7180        video_status: 0_u8,
7181        image_count: 0_i32,
7182        camera_device_id: 0_u8,
7183    };
7184    #[cfg(feature = "arbitrary")]
7185    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7186        use arbitrary::{Arbitrary, Unstructured};
7187        let mut buf = [0u8; 1024];
7188        rng.fill_bytes(&mut buf);
7189        let mut unstructured = Unstructured::new(&buf);
7190        Self::arbitrary(&mut unstructured).unwrap_or_default()
7191    }
7192}
7193impl Default for CAMERA_CAPTURE_STATUS_DATA {
7194    fn default() -> Self {
7195        Self::DEFAULT.clone()
7196    }
7197}
7198impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7199    type Message = MavMessage;
7200    const ID: u32 = 262u32;
7201    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7202    const EXTRA_CRC: u8 = 12u8;
7203    const ENCODED_LEN: usize = 23usize;
7204    fn deser(
7205        _version: MavlinkVersion,
7206        __input: &[u8],
7207    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7208        let avail_len = __input.len();
7209        let mut payload_buf = [0; Self::ENCODED_LEN];
7210        let mut buf = if avail_len < Self::ENCODED_LEN {
7211            payload_buf[0..avail_len].copy_from_slice(__input);
7212            Bytes::new(&payload_buf)
7213        } else {
7214            Bytes::new(__input)
7215        };
7216        let mut __struct = Self::default();
7217        __struct.time_boot_ms = buf.get_u32_le();
7218        __struct.image_interval = buf.get_f32_le();
7219        __struct.recording_time_ms = buf.get_u32_le();
7220        __struct.available_capacity = buf.get_f32_le();
7221        __struct.image_status = buf.get_u8();
7222        __struct.video_status = buf.get_u8();
7223        __struct.image_count = buf.get_i32_le();
7224        __struct.camera_device_id = buf.get_u8();
7225        Ok(__struct)
7226    }
7227    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7228        let mut __tmp = BytesMut::new(bytes);
7229        #[allow(clippy::absurd_extreme_comparisons)]
7230        #[allow(unused_comparisons)]
7231        if __tmp.remaining() < Self::ENCODED_LEN {
7232            panic!(
7233                "buffer is too small (need {} bytes, but got {})",
7234                Self::ENCODED_LEN,
7235                __tmp.remaining(),
7236            )
7237        }
7238        __tmp.put_u32_le(self.time_boot_ms);
7239        __tmp.put_f32_le(self.image_interval);
7240        __tmp.put_u32_le(self.recording_time_ms);
7241        __tmp.put_f32_le(self.available_capacity);
7242        __tmp.put_u8(self.image_status);
7243        __tmp.put_u8(self.video_status);
7244        if matches!(version, MavlinkVersion::V2) {
7245            __tmp.put_i32_le(self.image_count);
7246            __tmp.put_u8(self.camera_device_id);
7247            let len = __tmp.len();
7248            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7249        } else {
7250            __tmp.len()
7251        }
7252    }
7253}
7254#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7255#[doc = ""]
7256#[doc = "ID: 271"]
7257#[derive(Debug, Clone, PartialEq)]
7258#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7260#[cfg_attr(feature = "ts", derive(TS))]
7261#[cfg_attr(feature = "ts", ts(export))]
7262pub struct CAMERA_FOV_STATUS_DATA {
7263    #[doc = "Timestamp (time since system boot)."]
7264    pub time_boot_ms: u32,
7265    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7266    pub lat_camera: i32,
7267    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7268    pub lon_camera: i32,
7269    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7270    pub alt_camera: i32,
7271    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7272    pub lat_image: i32,
7273    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7274    pub lon_image: i32,
7275    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7276    pub alt_image: i32,
7277    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7278    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7279    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7280    pub q: [f32; 4],
7281    #[doc = "Horizontal field of view (NaN if unknown)."]
7282    pub hfov: f32,
7283    #[doc = "Vertical field of view (NaN if unknown)."]
7284    pub vfov: f32,
7285    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7286    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7287    pub camera_device_id: u8,
7288}
7289impl CAMERA_FOV_STATUS_DATA {
7290    pub const ENCODED_LEN: usize = 53usize;
7291    pub const DEFAULT: Self = Self {
7292        time_boot_ms: 0_u32,
7293        lat_camera: 0_i32,
7294        lon_camera: 0_i32,
7295        alt_camera: 0_i32,
7296        lat_image: 0_i32,
7297        lon_image: 0_i32,
7298        alt_image: 0_i32,
7299        q: [0.0_f32; 4usize],
7300        hfov: 0.0_f32,
7301        vfov: 0.0_f32,
7302        camera_device_id: 0_u8,
7303    };
7304    #[cfg(feature = "arbitrary")]
7305    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7306        use arbitrary::{Arbitrary, Unstructured};
7307        let mut buf = [0u8; 1024];
7308        rng.fill_bytes(&mut buf);
7309        let mut unstructured = Unstructured::new(&buf);
7310        Self::arbitrary(&mut unstructured).unwrap_or_default()
7311    }
7312}
7313impl Default for CAMERA_FOV_STATUS_DATA {
7314    fn default() -> Self {
7315        Self::DEFAULT.clone()
7316    }
7317}
7318impl MessageData for CAMERA_FOV_STATUS_DATA {
7319    type Message = MavMessage;
7320    const ID: u32 = 271u32;
7321    const NAME: &'static str = "CAMERA_FOV_STATUS";
7322    const EXTRA_CRC: u8 = 22u8;
7323    const ENCODED_LEN: usize = 53usize;
7324    fn deser(
7325        _version: MavlinkVersion,
7326        __input: &[u8],
7327    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7328        let avail_len = __input.len();
7329        let mut payload_buf = [0; Self::ENCODED_LEN];
7330        let mut buf = if avail_len < Self::ENCODED_LEN {
7331            payload_buf[0..avail_len].copy_from_slice(__input);
7332            Bytes::new(&payload_buf)
7333        } else {
7334            Bytes::new(__input)
7335        };
7336        let mut __struct = Self::default();
7337        __struct.time_boot_ms = buf.get_u32_le();
7338        __struct.lat_camera = buf.get_i32_le();
7339        __struct.lon_camera = buf.get_i32_le();
7340        __struct.alt_camera = buf.get_i32_le();
7341        __struct.lat_image = buf.get_i32_le();
7342        __struct.lon_image = buf.get_i32_le();
7343        __struct.alt_image = buf.get_i32_le();
7344        for v in &mut __struct.q {
7345            let val = buf.get_f32_le();
7346            *v = val;
7347        }
7348        __struct.hfov = buf.get_f32_le();
7349        __struct.vfov = buf.get_f32_le();
7350        __struct.camera_device_id = buf.get_u8();
7351        Ok(__struct)
7352    }
7353    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7354        let mut __tmp = BytesMut::new(bytes);
7355        #[allow(clippy::absurd_extreme_comparisons)]
7356        #[allow(unused_comparisons)]
7357        if __tmp.remaining() < Self::ENCODED_LEN {
7358            panic!(
7359                "buffer is too small (need {} bytes, but got {})",
7360                Self::ENCODED_LEN,
7361                __tmp.remaining(),
7362            )
7363        }
7364        __tmp.put_u32_le(self.time_boot_ms);
7365        __tmp.put_i32_le(self.lat_camera);
7366        __tmp.put_i32_le(self.lon_camera);
7367        __tmp.put_i32_le(self.alt_camera);
7368        __tmp.put_i32_le(self.lat_image);
7369        __tmp.put_i32_le(self.lon_image);
7370        __tmp.put_i32_le(self.alt_image);
7371        for val in &self.q {
7372            __tmp.put_f32_le(*val);
7373        }
7374        __tmp.put_f32_le(self.hfov);
7375        __tmp.put_f32_le(self.vfov);
7376        if matches!(version, MavlinkVersion::V2) {
7377            __tmp.put_u8(self.camera_device_id);
7378            let len = __tmp.len();
7379            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7380        } else {
7381            __tmp.len()
7382        }
7383    }
7384}
7385#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7386#[doc = ""]
7387#[doc = "ID: 263"]
7388#[derive(Debug, Clone, PartialEq)]
7389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7390#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7391#[cfg_attr(feature = "ts", derive(TS))]
7392#[cfg_attr(feature = "ts", ts(export))]
7393pub struct CAMERA_IMAGE_CAPTURED_DATA {
7394    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7395    pub time_utc: u64,
7396    #[doc = "Timestamp (time since system boot)."]
7397    pub time_boot_ms: u32,
7398    #[doc = "Latitude where image was taken"]
7399    pub lat: i32,
7400    #[doc = "Longitude where capture was taken"]
7401    pub lon: i32,
7402    #[doc = "Altitude (MSL) where image was taken"]
7403    pub alt: i32,
7404    #[doc = "Altitude above ground"]
7405    pub relative_alt: i32,
7406    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7407    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7408    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7409    pub q: [f32; 4],
7410    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7411    pub image_index: i32,
7412    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7413    pub camera_id: u8,
7414    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7415    pub capture_result: i8,
7416    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7417    #[cfg_attr(feature = "ts", ts(type = "string"))]
7418    pub file_url: CharArray<205>,
7419}
7420impl CAMERA_IMAGE_CAPTURED_DATA {
7421    pub const ENCODED_LEN: usize = 255usize;
7422    pub const DEFAULT: Self = Self {
7423        time_utc: 0_u64,
7424        time_boot_ms: 0_u32,
7425        lat: 0_i32,
7426        lon: 0_i32,
7427        alt: 0_i32,
7428        relative_alt: 0_i32,
7429        q: [0.0_f32; 4usize],
7430        image_index: 0_i32,
7431        camera_id: 0_u8,
7432        capture_result: 0_i8,
7433        file_url: CharArray::new([0_u8; 205usize]),
7434    };
7435    #[cfg(feature = "arbitrary")]
7436    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7437        use arbitrary::{Arbitrary, Unstructured};
7438        let mut buf = [0u8; 1024];
7439        rng.fill_bytes(&mut buf);
7440        let mut unstructured = Unstructured::new(&buf);
7441        Self::arbitrary(&mut unstructured).unwrap_or_default()
7442    }
7443}
7444impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7445    fn default() -> Self {
7446        Self::DEFAULT.clone()
7447    }
7448}
7449impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7450    type Message = MavMessage;
7451    const ID: u32 = 263u32;
7452    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7453    const EXTRA_CRC: u8 = 133u8;
7454    const ENCODED_LEN: usize = 255usize;
7455    fn deser(
7456        _version: MavlinkVersion,
7457        __input: &[u8],
7458    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7459        let avail_len = __input.len();
7460        let mut payload_buf = [0; Self::ENCODED_LEN];
7461        let mut buf = if avail_len < Self::ENCODED_LEN {
7462            payload_buf[0..avail_len].copy_from_slice(__input);
7463            Bytes::new(&payload_buf)
7464        } else {
7465            Bytes::new(__input)
7466        };
7467        let mut __struct = Self::default();
7468        __struct.time_utc = buf.get_u64_le();
7469        __struct.time_boot_ms = buf.get_u32_le();
7470        __struct.lat = buf.get_i32_le();
7471        __struct.lon = buf.get_i32_le();
7472        __struct.alt = buf.get_i32_le();
7473        __struct.relative_alt = buf.get_i32_le();
7474        for v in &mut __struct.q {
7475            let val = buf.get_f32_le();
7476            *v = val;
7477        }
7478        __struct.image_index = buf.get_i32_le();
7479        __struct.camera_id = buf.get_u8();
7480        __struct.capture_result = buf.get_i8();
7481        let mut tmp = [0_u8; 205usize];
7482        for v in &mut tmp {
7483            *v = buf.get_u8();
7484        }
7485        __struct.file_url = CharArray::new(tmp);
7486        Ok(__struct)
7487    }
7488    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7489        let mut __tmp = BytesMut::new(bytes);
7490        #[allow(clippy::absurd_extreme_comparisons)]
7491        #[allow(unused_comparisons)]
7492        if __tmp.remaining() < Self::ENCODED_LEN {
7493            panic!(
7494                "buffer is too small (need {} bytes, but got {})",
7495                Self::ENCODED_LEN,
7496                __tmp.remaining(),
7497            )
7498        }
7499        __tmp.put_u64_le(self.time_utc);
7500        __tmp.put_u32_le(self.time_boot_ms);
7501        __tmp.put_i32_le(self.lat);
7502        __tmp.put_i32_le(self.lon);
7503        __tmp.put_i32_le(self.alt);
7504        __tmp.put_i32_le(self.relative_alt);
7505        for val in &self.q {
7506            __tmp.put_f32_le(*val);
7507        }
7508        __tmp.put_i32_le(self.image_index);
7509        __tmp.put_u8(self.camera_id);
7510        __tmp.put_i8(self.capture_result);
7511        for val in &self.file_url {
7512            __tmp.put_u8(*val);
7513        }
7514        if matches!(version, MavlinkVersion::V2) {
7515            let len = __tmp.len();
7516            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7517        } else {
7518            __tmp.len()
7519        }
7520    }
7521}
7522#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7523#[doc = ""]
7524#[doc = "ID: 259"]
7525#[derive(Debug, Clone, PartialEq)]
7526#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7527#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7528#[cfg_attr(feature = "ts", derive(TS))]
7529#[cfg_attr(feature = "ts", ts(export))]
7530pub struct CAMERA_INFORMATION_DATA {
7531    #[doc = "Timestamp (time since system boot)."]
7532    pub time_boot_ms: u32,
7533    #[doc = "0xff). Use 0 if not known."]
7534    pub firmware_version: u32,
7535    #[doc = "Focal length. Use NaN if not known."]
7536    pub focal_length: f32,
7537    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7538    pub sensor_size_h: f32,
7539    #[doc = "Image sensor size vertical. Use NaN if not known."]
7540    pub sensor_size_v: f32,
7541    #[doc = "Bitmap of camera capability flags."]
7542    pub flags: CameraCapFlags,
7543    #[doc = "Horizontal image resolution. Use 0 if not known."]
7544    pub resolution_h: u16,
7545    #[doc = "Vertical image resolution. Use 0 if not known."]
7546    pub resolution_v: u16,
7547    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7548    pub cam_definition_version: u16,
7549    #[doc = "Name of the camera vendor"]
7550    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7551    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7552    pub vendor_name: [u8; 32],
7553    #[doc = "Name of the camera model"]
7554    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7555    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7556    pub model_name: [u8; 32],
7557    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7558    pub lens_id: u8,
7559    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7560    #[cfg_attr(feature = "ts", ts(type = "string"))]
7561    pub cam_definition_uri: CharArray<140>,
7562    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7563    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7564    pub gimbal_device_id: u8,
7565    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7566    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7567    pub camera_device_id: u8,
7568}
7569impl CAMERA_INFORMATION_DATA {
7570    pub const ENCODED_LEN: usize = 237usize;
7571    pub const DEFAULT: Self = Self {
7572        time_boot_ms: 0_u32,
7573        firmware_version: 0_u32,
7574        focal_length: 0.0_f32,
7575        sensor_size_h: 0.0_f32,
7576        sensor_size_v: 0.0_f32,
7577        flags: CameraCapFlags::DEFAULT,
7578        resolution_h: 0_u16,
7579        resolution_v: 0_u16,
7580        cam_definition_version: 0_u16,
7581        vendor_name: [0_u8; 32usize],
7582        model_name: [0_u8; 32usize],
7583        lens_id: 0_u8,
7584        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7585        gimbal_device_id: 0_u8,
7586        camera_device_id: 0_u8,
7587    };
7588    #[cfg(feature = "arbitrary")]
7589    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7590        use arbitrary::{Arbitrary, Unstructured};
7591        let mut buf = [0u8; 1024];
7592        rng.fill_bytes(&mut buf);
7593        let mut unstructured = Unstructured::new(&buf);
7594        Self::arbitrary(&mut unstructured).unwrap_or_default()
7595    }
7596}
7597impl Default for CAMERA_INFORMATION_DATA {
7598    fn default() -> Self {
7599        Self::DEFAULT.clone()
7600    }
7601}
7602impl MessageData for CAMERA_INFORMATION_DATA {
7603    type Message = MavMessage;
7604    const ID: u32 = 259u32;
7605    const NAME: &'static str = "CAMERA_INFORMATION";
7606    const EXTRA_CRC: u8 = 92u8;
7607    const ENCODED_LEN: usize = 237usize;
7608    fn deser(
7609        _version: MavlinkVersion,
7610        __input: &[u8],
7611    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7612        let avail_len = __input.len();
7613        let mut payload_buf = [0; Self::ENCODED_LEN];
7614        let mut buf = if avail_len < Self::ENCODED_LEN {
7615            payload_buf[0..avail_len].copy_from_slice(__input);
7616            Bytes::new(&payload_buf)
7617        } else {
7618            Bytes::new(__input)
7619        };
7620        let mut __struct = Self::default();
7621        __struct.time_boot_ms = buf.get_u32_le();
7622        __struct.firmware_version = buf.get_u32_le();
7623        __struct.focal_length = buf.get_f32_le();
7624        __struct.sensor_size_h = buf.get_f32_le();
7625        __struct.sensor_size_v = buf.get_f32_le();
7626        let tmp = buf.get_u32_le();
7627        __struct.flags = CameraCapFlags::from_bits(tmp as <CameraCapFlags as Flags>::Bits).ok_or(
7628            ::mavlink_core::error::ParserError::InvalidFlag {
7629                flag_type: "CameraCapFlags",
7630                value: tmp as u64,
7631            },
7632        )?;
7633        __struct.resolution_h = buf.get_u16_le();
7634        __struct.resolution_v = buf.get_u16_le();
7635        __struct.cam_definition_version = buf.get_u16_le();
7636        for v in &mut __struct.vendor_name {
7637            let val = buf.get_u8();
7638            *v = val;
7639        }
7640        for v in &mut __struct.model_name {
7641            let val = buf.get_u8();
7642            *v = val;
7643        }
7644        __struct.lens_id = buf.get_u8();
7645        let mut tmp = [0_u8; 140usize];
7646        for v in &mut tmp {
7647            *v = buf.get_u8();
7648        }
7649        __struct.cam_definition_uri = CharArray::new(tmp);
7650        __struct.gimbal_device_id = buf.get_u8();
7651        __struct.camera_device_id = buf.get_u8();
7652        Ok(__struct)
7653    }
7654    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7655        let mut __tmp = BytesMut::new(bytes);
7656        #[allow(clippy::absurd_extreme_comparisons)]
7657        #[allow(unused_comparisons)]
7658        if __tmp.remaining() < Self::ENCODED_LEN {
7659            panic!(
7660                "buffer is too small (need {} bytes, but got {})",
7661                Self::ENCODED_LEN,
7662                __tmp.remaining(),
7663            )
7664        }
7665        __tmp.put_u32_le(self.time_boot_ms);
7666        __tmp.put_u32_le(self.firmware_version);
7667        __tmp.put_f32_le(self.focal_length);
7668        __tmp.put_f32_le(self.sensor_size_h);
7669        __tmp.put_f32_le(self.sensor_size_v);
7670        __tmp.put_u32_le(self.flags.bits() as u32);
7671        __tmp.put_u16_le(self.resolution_h);
7672        __tmp.put_u16_le(self.resolution_v);
7673        __tmp.put_u16_le(self.cam_definition_version);
7674        for val in &self.vendor_name {
7675            __tmp.put_u8(*val);
7676        }
7677        for val in &self.model_name {
7678            __tmp.put_u8(*val);
7679        }
7680        __tmp.put_u8(self.lens_id);
7681        for val in &self.cam_definition_uri {
7682            __tmp.put_u8(*val);
7683        }
7684        if matches!(version, MavlinkVersion::V2) {
7685            __tmp.put_u8(self.gimbal_device_id);
7686            __tmp.put_u8(self.camera_device_id);
7687            let len = __tmp.len();
7688            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7689        } else {
7690            __tmp.len()
7691        }
7692    }
7693}
7694#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7695#[doc = ""]
7696#[doc = "ID: 260"]
7697#[derive(Debug, Clone, PartialEq)]
7698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7700#[cfg_attr(feature = "ts", derive(TS))]
7701#[cfg_attr(feature = "ts", ts(export))]
7702pub struct CAMERA_SETTINGS_DATA {
7703    #[doc = "Timestamp (time since system boot)."]
7704    pub time_boot_ms: u32,
7705    #[doc = "Camera mode"]
7706    pub mode_id: CameraMode,
7707    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7708    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7709    pub zoomLevel: f32,
7710    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7711    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7712    pub focusLevel: f32,
7713    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7714    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7715    pub camera_device_id: u8,
7716}
7717impl CAMERA_SETTINGS_DATA {
7718    pub const ENCODED_LEN: usize = 14usize;
7719    pub const DEFAULT: Self = Self {
7720        time_boot_ms: 0_u32,
7721        mode_id: CameraMode::DEFAULT,
7722        zoomLevel: 0.0_f32,
7723        focusLevel: 0.0_f32,
7724        camera_device_id: 0_u8,
7725    };
7726    #[cfg(feature = "arbitrary")]
7727    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7728        use arbitrary::{Arbitrary, Unstructured};
7729        let mut buf = [0u8; 1024];
7730        rng.fill_bytes(&mut buf);
7731        let mut unstructured = Unstructured::new(&buf);
7732        Self::arbitrary(&mut unstructured).unwrap_or_default()
7733    }
7734}
7735impl Default for CAMERA_SETTINGS_DATA {
7736    fn default() -> Self {
7737        Self::DEFAULT.clone()
7738    }
7739}
7740impl MessageData for CAMERA_SETTINGS_DATA {
7741    type Message = MavMessage;
7742    const ID: u32 = 260u32;
7743    const NAME: &'static str = "CAMERA_SETTINGS";
7744    const EXTRA_CRC: u8 = 146u8;
7745    const ENCODED_LEN: usize = 14usize;
7746    fn deser(
7747        _version: MavlinkVersion,
7748        __input: &[u8],
7749    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7750        let avail_len = __input.len();
7751        let mut payload_buf = [0; Self::ENCODED_LEN];
7752        let mut buf = if avail_len < Self::ENCODED_LEN {
7753            payload_buf[0..avail_len].copy_from_slice(__input);
7754            Bytes::new(&payload_buf)
7755        } else {
7756            Bytes::new(__input)
7757        };
7758        let mut __struct = Self::default();
7759        __struct.time_boot_ms = buf.get_u32_le();
7760        let tmp = buf.get_u8();
7761        __struct.mode_id =
7762            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7763                enum_type: "CameraMode",
7764                value: tmp as u64,
7765            })?;
7766        __struct.zoomLevel = buf.get_f32_le();
7767        __struct.focusLevel = buf.get_f32_le();
7768        __struct.camera_device_id = buf.get_u8();
7769        Ok(__struct)
7770    }
7771    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7772        let mut __tmp = BytesMut::new(bytes);
7773        #[allow(clippy::absurd_extreme_comparisons)]
7774        #[allow(unused_comparisons)]
7775        if __tmp.remaining() < Self::ENCODED_LEN {
7776            panic!(
7777                "buffer is too small (need {} bytes, but got {})",
7778                Self::ENCODED_LEN,
7779                __tmp.remaining(),
7780            )
7781        }
7782        __tmp.put_u32_le(self.time_boot_ms);
7783        __tmp.put_u8(self.mode_id as u8);
7784        if matches!(version, MavlinkVersion::V2) {
7785            __tmp.put_f32_le(self.zoomLevel);
7786            __tmp.put_f32_le(self.focusLevel);
7787            __tmp.put_u8(self.camera_device_id);
7788            let len = __tmp.len();
7789            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7790        } else {
7791            __tmp.len()
7792        }
7793    }
7794}
7795#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7796#[doc = ""]
7797#[doc = "ID: 277"]
7798#[derive(Debug, Clone, PartialEq)]
7799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7801#[cfg_attr(feature = "ts", derive(TS))]
7802#[cfg_attr(feature = "ts", ts(export))]
7803pub struct CAMERA_THERMAL_RANGE_DATA {
7804    #[doc = "Timestamp (time since system boot)."]
7805    pub time_boot_ms: u32,
7806    #[doc = "Temperature max."]
7807    pub max: f32,
7808    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7809    pub max_point_x: f32,
7810    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7811    pub max_point_y: f32,
7812    #[doc = "Temperature min."]
7813    pub min: f32,
7814    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7815    pub min_point_x: f32,
7816    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7817    pub min_point_y: f32,
7818    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7819    pub stream_id: u8,
7820    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7821    pub camera_device_id: u8,
7822}
7823impl CAMERA_THERMAL_RANGE_DATA {
7824    pub const ENCODED_LEN: usize = 30usize;
7825    pub const DEFAULT: Self = Self {
7826        time_boot_ms: 0_u32,
7827        max: 0.0_f32,
7828        max_point_x: 0.0_f32,
7829        max_point_y: 0.0_f32,
7830        min: 0.0_f32,
7831        min_point_x: 0.0_f32,
7832        min_point_y: 0.0_f32,
7833        stream_id: 0_u8,
7834        camera_device_id: 0_u8,
7835    };
7836    #[cfg(feature = "arbitrary")]
7837    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7838        use arbitrary::{Arbitrary, Unstructured};
7839        let mut buf = [0u8; 1024];
7840        rng.fill_bytes(&mut buf);
7841        let mut unstructured = Unstructured::new(&buf);
7842        Self::arbitrary(&mut unstructured).unwrap_or_default()
7843    }
7844}
7845impl Default for CAMERA_THERMAL_RANGE_DATA {
7846    fn default() -> Self {
7847        Self::DEFAULT.clone()
7848    }
7849}
7850impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7851    type Message = MavMessage;
7852    const ID: u32 = 277u32;
7853    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7854    const EXTRA_CRC: u8 = 62u8;
7855    const ENCODED_LEN: usize = 30usize;
7856    fn deser(
7857        _version: MavlinkVersion,
7858        __input: &[u8],
7859    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7860        let avail_len = __input.len();
7861        let mut payload_buf = [0; Self::ENCODED_LEN];
7862        let mut buf = if avail_len < Self::ENCODED_LEN {
7863            payload_buf[0..avail_len].copy_from_slice(__input);
7864            Bytes::new(&payload_buf)
7865        } else {
7866            Bytes::new(__input)
7867        };
7868        let mut __struct = Self::default();
7869        __struct.time_boot_ms = buf.get_u32_le();
7870        __struct.max = buf.get_f32_le();
7871        __struct.max_point_x = buf.get_f32_le();
7872        __struct.max_point_y = buf.get_f32_le();
7873        __struct.min = buf.get_f32_le();
7874        __struct.min_point_x = buf.get_f32_le();
7875        __struct.min_point_y = buf.get_f32_le();
7876        __struct.stream_id = buf.get_u8();
7877        __struct.camera_device_id = buf.get_u8();
7878        Ok(__struct)
7879    }
7880    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7881        let mut __tmp = BytesMut::new(bytes);
7882        #[allow(clippy::absurd_extreme_comparisons)]
7883        #[allow(unused_comparisons)]
7884        if __tmp.remaining() < Self::ENCODED_LEN {
7885            panic!(
7886                "buffer is too small (need {} bytes, but got {})",
7887                Self::ENCODED_LEN,
7888                __tmp.remaining(),
7889            )
7890        }
7891        __tmp.put_u32_le(self.time_boot_ms);
7892        __tmp.put_f32_le(self.max);
7893        __tmp.put_f32_le(self.max_point_x);
7894        __tmp.put_f32_le(self.max_point_y);
7895        __tmp.put_f32_le(self.min);
7896        __tmp.put_f32_le(self.min_point_x);
7897        __tmp.put_f32_le(self.min_point_y);
7898        __tmp.put_u8(self.stream_id);
7899        __tmp.put_u8(self.camera_device_id);
7900        if matches!(version, MavlinkVersion::V2) {
7901            let len = __tmp.len();
7902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7903        } else {
7904            __tmp.len()
7905        }
7906    }
7907}
7908#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7909#[doc = ""]
7910#[doc = "ID: 276"]
7911#[derive(Debug, Clone, PartialEq)]
7912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7914#[cfg_attr(feature = "ts", derive(TS))]
7915#[cfg_attr(feature = "ts", ts(export))]
7916pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7917    #[doc = "Latitude of tracked object"]
7918    pub lat: i32,
7919    #[doc = "Longitude of tracked object"]
7920    pub lon: i32,
7921    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7922    pub alt: f32,
7923    #[doc = "Horizontal accuracy. NAN if unknown"]
7924    pub h_acc: f32,
7925    #[doc = "Vertical accuracy. NAN if unknown"]
7926    pub v_acc: f32,
7927    #[doc = "North velocity of tracked object. NAN if unknown"]
7928    pub vel_n: f32,
7929    #[doc = "East velocity of tracked object. NAN if unknown"]
7930    pub vel_e: f32,
7931    #[doc = "Down velocity of tracked object. NAN if unknown"]
7932    pub vel_d: f32,
7933    #[doc = "Velocity accuracy. NAN if unknown"]
7934    pub vel_acc: f32,
7935    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7936    pub dist: f32,
7937    #[doc = "Heading in radians, in NED. NAN if unknown"]
7938    pub hdg: f32,
7939    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7940    pub hdg_acc: f32,
7941    #[doc = "Current tracking status"]
7942    pub tracking_status: CameraTrackingStatusFlags,
7943    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7944    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7945    pub camera_device_id: u8,
7946}
7947impl CAMERA_TRACKING_GEO_STATUS_DATA {
7948    pub const ENCODED_LEN: usize = 50usize;
7949    pub const DEFAULT: Self = Self {
7950        lat: 0_i32,
7951        lon: 0_i32,
7952        alt: 0.0_f32,
7953        h_acc: 0.0_f32,
7954        v_acc: 0.0_f32,
7955        vel_n: 0.0_f32,
7956        vel_e: 0.0_f32,
7957        vel_d: 0.0_f32,
7958        vel_acc: 0.0_f32,
7959        dist: 0.0_f32,
7960        hdg: 0.0_f32,
7961        hdg_acc: 0.0_f32,
7962        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7963        camera_device_id: 0_u8,
7964    };
7965    #[cfg(feature = "arbitrary")]
7966    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7967        use arbitrary::{Arbitrary, Unstructured};
7968        let mut buf = [0u8; 1024];
7969        rng.fill_bytes(&mut buf);
7970        let mut unstructured = Unstructured::new(&buf);
7971        Self::arbitrary(&mut unstructured).unwrap_or_default()
7972    }
7973}
7974impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7975    fn default() -> Self {
7976        Self::DEFAULT.clone()
7977    }
7978}
7979impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7980    type Message = MavMessage;
7981    const ID: u32 = 276u32;
7982    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7983    const EXTRA_CRC: u8 = 18u8;
7984    const ENCODED_LEN: usize = 50usize;
7985    fn deser(
7986        _version: MavlinkVersion,
7987        __input: &[u8],
7988    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7989        let avail_len = __input.len();
7990        let mut payload_buf = [0; Self::ENCODED_LEN];
7991        let mut buf = if avail_len < Self::ENCODED_LEN {
7992            payload_buf[0..avail_len].copy_from_slice(__input);
7993            Bytes::new(&payload_buf)
7994        } else {
7995            Bytes::new(__input)
7996        };
7997        let mut __struct = Self::default();
7998        __struct.lat = buf.get_i32_le();
7999        __struct.lon = buf.get_i32_le();
8000        __struct.alt = buf.get_f32_le();
8001        __struct.h_acc = buf.get_f32_le();
8002        __struct.v_acc = buf.get_f32_le();
8003        __struct.vel_n = buf.get_f32_le();
8004        __struct.vel_e = buf.get_f32_le();
8005        __struct.vel_d = buf.get_f32_le();
8006        __struct.vel_acc = buf.get_f32_le();
8007        __struct.dist = buf.get_f32_le();
8008        __struct.hdg = buf.get_f32_le();
8009        __struct.hdg_acc = buf.get_f32_le();
8010        let tmp = buf.get_u8();
8011        __struct.tracking_status =
8012            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8013                enum_type: "CameraTrackingStatusFlags",
8014                value: tmp as u64,
8015            })?;
8016        __struct.camera_device_id = buf.get_u8();
8017        Ok(__struct)
8018    }
8019    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8020        let mut __tmp = BytesMut::new(bytes);
8021        #[allow(clippy::absurd_extreme_comparisons)]
8022        #[allow(unused_comparisons)]
8023        if __tmp.remaining() < Self::ENCODED_LEN {
8024            panic!(
8025                "buffer is too small (need {} bytes, but got {})",
8026                Self::ENCODED_LEN,
8027                __tmp.remaining(),
8028            )
8029        }
8030        __tmp.put_i32_le(self.lat);
8031        __tmp.put_i32_le(self.lon);
8032        __tmp.put_f32_le(self.alt);
8033        __tmp.put_f32_le(self.h_acc);
8034        __tmp.put_f32_le(self.v_acc);
8035        __tmp.put_f32_le(self.vel_n);
8036        __tmp.put_f32_le(self.vel_e);
8037        __tmp.put_f32_le(self.vel_d);
8038        __tmp.put_f32_le(self.vel_acc);
8039        __tmp.put_f32_le(self.dist);
8040        __tmp.put_f32_le(self.hdg);
8041        __tmp.put_f32_le(self.hdg_acc);
8042        __tmp.put_u8(self.tracking_status as u8);
8043        if matches!(version, MavlinkVersion::V2) {
8044            __tmp.put_u8(self.camera_device_id);
8045            let len = __tmp.len();
8046            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8047        } else {
8048            __tmp.len()
8049        }
8050    }
8051}
8052#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8053#[doc = ""]
8054#[doc = "ID: 275"]
8055#[derive(Debug, Clone, PartialEq)]
8056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8057#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8058#[cfg_attr(feature = "ts", derive(TS))]
8059#[cfg_attr(feature = "ts", ts(export))]
8060pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8061    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8062    pub point_x: f32,
8063    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8064    pub point_y: f32,
8065    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8066    pub radius: f32,
8067    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8068    pub rec_top_x: f32,
8069    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8070    pub rec_top_y: f32,
8071    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8072    pub rec_bottom_x: f32,
8073    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8074    pub rec_bottom_y: f32,
8075    #[doc = "Current tracking status"]
8076    pub tracking_status: CameraTrackingStatusFlags,
8077    #[doc = "Current tracking mode"]
8078    pub tracking_mode: CameraTrackingMode,
8079    #[doc = "Defines location of target data"]
8080    pub target_data: CameraTrackingTargetData,
8081    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8082    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8083    pub camera_device_id: u8,
8084}
8085impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8086    pub const ENCODED_LEN: usize = 32usize;
8087    pub const DEFAULT: Self = Self {
8088        point_x: 0.0_f32,
8089        point_y: 0.0_f32,
8090        radius: 0.0_f32,
8091        rec_top_x: 0.0_f32,
8092        rec_top_y: 0.0_f32,
8093        rec_bottom_x: 0.0_f32,
8094        rec_bottom_y: 0.0_f32,
8095        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8096        tracking_mode: CameraTrackingMode::DEFAULT,
8097        target_data: CameraTrackingTargetData::DEFAULT,
8098        camera_device_id: 0_u8,
8099    };
8100    #[cfg(feature = "arbitrary")]
8101    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8102        use arbitrary::{Arbitrary, Unstructured};
8103        let mut buf = [0u8; 1024];
8104        rng.fill_bytes(&mut buf);
8105        let mut unstructured = Unstructured::new(&buf);
8106        Self::arbitrary(&mut unstructured).unwrap_or_default()
8107    }
8108}
8109impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8110    fn default() -> Self {
8111        Self::DEFAULT.clone()
8112    }
8113}
8114impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8115    type Message = MavMessage;
8116    const ID: u32 = 275u32;
8117    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8118    const EXTRA_CRC: u8 = 126u8;
8119    const ENCODED_LEN: usize = 32usize;
8120    fn deser(
8121        _version: MavlinkVersion,
8122        __input: &[u8],
8123    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8124        let avail_len = __input.len();
8125        let mut payload_buf = [0; Self::ENCODED_LEN];
8126        let mut buf = if avail_len < Self::ENCODED_LEN {
8127            payload_buf[0..avail_len].copy_from_slice(__input);
8128            Bytes::new(&payload_buf)
8129        } else {
8130            Bytes::new(__input)
8131        };
8132        let mut __struct = Self::default();
8133        __struct.point_x = buf.get_f32_le();
8134        __struct.point_y = buf.get_f32_le();
8135        __struct.radius = buf.get_f32_le();
8136        __struct.rec_top_x = buf.get_f32_le();
8137        __struct.rec_top_y = buf.get_f32_le();
8138        __struct.rec_bottom_x = buf.get_f32_le();
8139        __struct.rec_bottom_y = buf.get_f32_le();
8140        let tmp = buf.get_u8();
8141        __struct.tracking_status =
8142            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8143                enum_type: "CameraTrackingStatusFlags",
8144                value: tmp as u64,
8145            })?;
8146        let tmp = buf.get_u8();
8147        __struct.tracking_mode =
8148            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8149                enum_type: "CameraTrackingMode",
8150                value: tmp as u64,
8151            })?;
8152        let tmp = buf.get_u8();
8153        __struct.target_data =
8154            CameraTrackingTargetData::from_bits(tmp as <CameraTrackingTargetData as Flags>::Bits)
8155                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8156                flag_type: "CameraTrackingTargetData",
8157                value: tmp as u64,
8158            })?;
8159        __struct.camera_device_id = buf.get_u8();
8160        Ok(__struct)
8161    }
8162    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8163        let mut __tmp = BytesMut::new(bytes);
8164        #[allow(clippy::absurd_extreme_comparisons)]
8165        #[allow(unused_comparisons)]
8166        if __tmp.remaining() < Self::ENCODED_LEN {
8167            panic!(
8168                "buffer is too small (need {} bytes, but got {})",
8169                Self::ENCODED_LEN,
8170                __tmp.remaining(),
8171            )
8172        }
8173        __tmp.put_f32_le(self.point_x);
8174        __tmp.put_f32_le(self.point_y);
8175        __tmp.put_f32_le(self.radius);
8176        __tmp.put_f32_le(self.rec_top_x);
8177        __tmp.put_f32_le(self.rec_top_y);
8178        __tmp.put_f32_le(self.rec_bottom_x);
8179        __tmp.put_f32_le(self.rec_bottom_y);
8180        __tmp.put_u8(self.tracking_status as u8);
8181        __tmp.put_u8(self.tracking_mode as u8);
8182        __tmp.put_u8(self.target_data.bits() as u8);
8183        if matches!(version, MavlinkVersion::V2) {
8184            __tmp.put_u8(self.camera_device_id);
8185            let len = __tmp.len();
8186            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8187        } else {
8188            __tmp.len()
8189        }
8190    }
8191}
8192#[doc = "Camera-IMU triggering and synchronisation message."]
8193#[doc = ""]
8194#[doc = "ID: 112"]
8195#[derive(Debug, Clone, PartialEq)]
8196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8198#[cfg_attr(feature = "ts", derive(TS))]
8199#[cfg_attr(feature = "ts", ts(export))]
8200pub struct CAMERA_TRIGGER_DATA {
8201    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8202    pub time_usec: u64,
8203    #[doc = "Image frame sequence"]
8204    pub seq: u32,
8205}
8206impl CAMERA_TRIGGER_DATA {
8207    pub const ENCODED_LEN: usize = 12usize;
8208    pub const DEFAULT: Self = Self {
8209        time_usec: 0_u64,
8210        seq: 0_u32,
8211    };
8212    #[cfg(feature = "arbitrary")]
8213    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8214        use arbitrary::{Arbitrary, Unstructured};
8215        let mut buf = [0u8; 1024];
8216        rng.fill_bytes(&mut buf);
8217        let mut unstructured = Unstructured::new(&buf);
8218        Self::arbitrary(&mut unstructured).unwrap_or_default()
8219    }
8220}
8221impl Default for CAMERA_TRIGGER_DATA {
8222    fn default() -> Self {
8223        Self::DEFAULT.clone()
8224    }
8225}
8226impl MessageData for CAMERA_TRIGGER_DATA {
8227    type Message = MavMessage;
8228    const ID: u32 = 112u32;
8229    const NAME: &'static str = "CAMERA_TRIGGER";
8230    const EXTRA_CRC: u8 = 174u8;
8231    const ENCODED_LEN: usize = 12usize;
8232    fn deser(
8233        _version: MavlinkVersion,
8234        __input: &[u8],
8235    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8236        let avail_len = __input.len();
8237        let mut payload_buf = [0; Self::ENCODED_LEN];
8238        let mut buf = if avail_len < Self::ENCODED_LEN {
8239            payload_buf[0..avail_len].copy_from_slice(__input);
8240            Bytes::new(&payload_buf)
8241        } else {
8242            Bytes::new(__input)
8243        };
8244        let mut __struct = Self::default();
8245        __struct.time_usec = buf.get_u64_le();
8246        __struct.seq = buf.get_u32_le();
8247        Ok(__struct)
8248    }
8249    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8250        let mut __tmp = BytesMut::new(bytes);
8251        #[allow(clippy::absurd_extreme_comparisons)]
8252        #[allow(unused_comparisons)]
8253        if __tmp.remaining() < Self::ENCODED_LEN {
8254            panic!(
8255                "buffer is too small (need {} bytes, but got {})",
8256                Self::ENCODED_LEN,
8257                __tmp.remaining(),
8258            )
8259        }
8260        __tmp.put_u64_le(self.time_usec);
8261        __tmp.put_u32_le(self.seq);
8262        if matches!(version, MavlinkVersion::V2) {
8263            let len = __tmp.len();
8264            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8265        } else {
8266            __tmp.len()
8267        }
8268    }
8269}
8270#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8271#[doc = ""]
8272#[doc = "ID: 387"]
8273#[derive(Debug, Clone, PartialEq)]
8274#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8276#[cfg_attr(feature = "ts", derive(TS))]
8277#[cfg_attr(feature = "ts", ts(export))]
8278pub struct CANFD_FRAME_DATA {
8279    #[doc = "Frame ID"]
8280    pub id: u32,
8281    #[doc = "System ID."]
8282    pub target_system: u8,
8283    #[doc = "Component ID."]
8284    pub target_component: u8,
8285    #[doc = "bus number"]
8286    pub bus: u8,
8287    #[doc = "Frame length"]
8288    pub len: u8,
8289    #[doc = "Frame data"]
8290    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8291    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8292    pub data: [u8; 64],
8293}
8294impl CANFD_FRAME_DATA {
8295    pub const ENCODED_LEN: usize = 72usize;
8296    pub const DEFAULT: Self = Self {
8297        id: 0_u32,
8298        target_system: 0_u8,
8299        target_component: 0_u8,
8300        bus: 0_u8,
8301        len: 0_u8,
8302        data: [0_u8; 64usize],
8303    };
8304    #[cfg(feature = "arbitrary")]
8305    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8306        use arbitrary::{Arbitrary, Unstructured};
8307        let mut buf = [0u8; 1024];
8308        rng.fill_bytes(&mut buf);
8309        let mut unstructured = Unstructured::new(&buf);
8310        Self::arbitrary(&mut unstructured).unwrap_or_default()
8311    }
8312}
8313impl Default for CANFD_FRAME_DATA {
8314    fn default() -> Self {
8315        Self::DEFAULT.clone()
8316    }
8317}
8318impl MessageData for CANFD_FRAME_DATA {
8319    type Message = MavMessage;
8320    const ID: u32 = 387u32;
8321    const NAME: &'static str = "CANFD_FRAME";
8322    const EXTRA_CRC: u8 = 4u8;
8323    const ENCODED_LEN: usize = 72usize;
8324    fn deser(
8325        _version: MavlinkVersion,
8326        __input: &[u8],
8327    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8328        let avail_len = __input.len();
8329        let mut payload_buf = [0; Self::ENCODED_LEN];
8330        let mut buf = if avail_len < Self::ENCODED_LEN {
8331            payload_buf[0..avail_len].copy_from_slice(__input);
8332            Bytes::new(&payload_buf)
8333        } else {
8334            Bytes::new(__input)
8335        };
8336        let mut __struct = Self::default();
8337        __struct.id = buf.get_u32_le();
8338        __struct.target_system = buf.get_u8();
8339        __struct.target_component = buf.get_u8();
8340        __struct.bus = buf.get_u8();
8341        __struct.len = buf.get_u8();
8342        for v in &mut __struct.data {
8343            let val = buf.get_u8();
8344            *v = val;
8345        }
8346        Ok(__struct)
8347    }
8348    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8349        let mut __tmp = BytesMut::new(bytes);
8350        #[allow(clippy::absurd_extreme_comparisons)]
8351        #[allow(unused_comparisons)]
8352        if __tmp.remaining() < Self::ENCODED_LEN {
8353            panic!(
8354                "buffer is too small (need {} bytes, but got {})",
8355                Self::ENCODED_LEN,
8356                __tmp.remaining(),
8357            )
8358        }
8359        __tmp.put_u32_le(self.id);
8360        __tmp.put_u8(self.target_system);
8361        __tmp.put_u8(self.target_component);
8362        __tmp.put_u8(self.bus);
8363        __tmp.put_u8(self.len);
8364        for val in &self.data {
8365            __tmp.put_u8(*val);
8366        }
8367        if matches!(version, MavlinkVersion::V2) {
8368            let len = __tmp.len();
8369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8370        } else {
8371            __tmp.len()
8372        }
8373    }
8374}
8375#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8376#[doc = ""]
8377#[doc = "ID: 388"]
8378#[derive(Debug, Clone, PartialEq)]
8379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8381#[cfg_attr(feature = "ts", derive(TS))]
8382#[cfg_attr(feature = "ts", ts(export))]
8383pub struct CAN_FILTER_MODIFY_DATA {
8384    #[doc = "filter IDs, length num_ids"]
8385    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8386    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8387    pub ids: [u16; 16],
8388    #[doc = "System ID."]
8389    pub target_system: u8,
8390    #[doc = "Component ID."]
8391    pub target_component: u8,
8392    #[doc = "bus number"]
8393    pub bus: u8,
8394    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8395    pub operation: CanFilterOp,
8396    #[doc = "number of IDs in filter list"]
8397    pub num_ids: u8,
8398}
8399impl CAN_FILTER_MODIFY_DATA {
8400    pub const ENCODED_LEN: usize = 37usize;
8401    pub const DEFAULT: Self = Self {
8402        ids: [0_u16; 16usize],
8403        target_system: 0_u8,
8404        target_component: 0_u8,
8405        bus: 0_u8,
8406        operation: CanFilterOp::DEFAULT,
8407        num_ids: 0_u8,
8408    };
8409    #[cfg(feature = "arbitrary")]
8410    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8411        use arbitrary::{Arbitrary, Unstructured};
8412        let mut buf = [0u8; 1024];
8413        rng.fill_bytes(&mut buf);
8414        let mut unstructured = Unstructured::new(&buf);
8415        Self::arbitrary(&mut unstructured).unwrap_or_default()
8416    }
8417}
8418impl Default for CAN_FILTER_MODIFY_DATA {
8419    fn default() -> Self {
8420        Self::DEFAULT.clone()
8421    }
8422}
8423impl MessageData for CAN_FILTER_MODIFY_DATA {
8424    type Message = MavMessage;
8425    const ID: u32 = 388u32;
8426    const NAME: &'static str = "CAN_FILTER_MODIFY";
8427    const EXTRA_CRC: u8 = 8u8;
8428    const ENCODED_LEN: usize = 37usize;
8429    fn deser(
8430        _version: MavlinkVersion,
8431        __input: &[u8],
8432    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8433        let avail_len = __input.len();
8434        let mut payload_buf = [0; Self::ENCODED_LEN];
8435        let mut buf = if avail_len < Self::ENCODED_LEN {
8436            payload_buf[0..avail_len].copy_from_slice(__input);
8437            Bytes::new(&payload_buf)
8438        } else {
8439            Bytes::new(__input)
8440        };
8441        let mut __struct = Self::default();
8442        for v in &mut __struct.ids {
8443            let val = buf.get_u16_le();
8444            *v = val;
8445        }
8446        __struct.target_system = buf.get_u8();
8447        __struct.target_component = buf.get_u8();
8448        __struct.bus = buf.get_u8();
8449        let tmp = buf.get_u8();
8450        __struct.operation =
8451            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8452                enum_type: "CanFilterOp",
8453                value: tmp as u64,
8454            })?;
8455        __struct.num_ids = buf.get_u8();
8456        Ok(__struct)
8457    }
8458    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8459        let mut __tmp = BytesMut::new(bytes);
8460        #[allow(clippy::absurd_extreme_comparisons)]
8461        #[allow(unused_comparisons)]
8462        if __tmp.remaining() < Self::ENCODED_LEN {
8463            panic!(
8464                "buffer is too small (need {} bytes, but got {})",
8465                Self::ENCODED_LEN,
8466                __tmp.remaining(),
8467            )
8468        }
8469        for val in &self.ids {
8470            __tmp.put_u16_le(*val);
8471        }
8472        __tmp.put_u8(self.target_system);
8473        __tmp.put_u8(self.target_component);
8474        __tmp.put_u8(self.bus);
8475        __tmp.put_u8(self.operation as u8);
8476        __tmp.put_u8(self.num_ids);
8477        if matches!(version, MavlinkVersion::V2) {
8478            let len = __tmp.len();
8479            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8480        } else {
8481            __tmp.len()
8482        }
8483    }
8484}
8485#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8486#[doc = ""]
8487#[doc = "ID: 386"]
8488#[derive(Debug, Clone, PartialEq)]
8489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8491#[cfg_attr(feature = "ts", derive(TS))]
8492#[cfg_attr(feature = "ts", ts(export))]
8493pub struct CAN_FRAME_DATA {
8494    #[doc = "Frame ID"]
8495    pub id: u32,
8496    #[doc = "System ID."]
8497    pub target_system: u8,
8498    #[doc = "Component ID."]
8499    pub target_component: u8,
8500    #[doc = "Bus number"]
8501    pub bus: u8,
8502    #[doc = "Frame length"]
8503    pub len: u8,
8504    #[doc = "Frame data"]
8505    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8506    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8507    pub data: [u8; 8],
8508}
8509impl CAN_FRAME_DATA {
8510    pub const ENCODED_LEN: usize = 16usize;
8511    pub const DEFAULT: Self = Self {
8512        id: 0_u32,
8513        target_system: 0_u8,
8514        target_component: 0_u8,
8515        bus: 0_u8,
8516        len: 0_u8,
8517        data: [0_u8; 8usize],
8518    };
8519    #[cfg(feature = "arbitrary")]
8520    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8521        use arbitrary::{Arbitrary, Unstructured};
8522        let mut buf = [0u8; 1024];
8523        rng.fill_bytes(&mut buf);
8524        let mut unstructured = Unstructured::new(&buf);
8525        Self::arbitrary(&mut unstructured).unwrap_or_default()
8526    }
8527}
8528impl Default for CAN_FRAME_DATA {
8529    fn default() -> Self {
8530        Self::DEFAULT.clone()
8531    }
8532}
8533impl MessageData for CAN_FRAME_DATA {
8534    type Message = MavMessage;
8535    const ID: u32 = 386u32;
8536    const NAME: &'static str = "CAN_FRAME";
8537    const EXTRA_CRC: u8 = 132u8;
8538    const ENCODED_LEN: usize = 16usize;
8539    fn deser(
8540        _version: MavlinkVersion,
8541        __input: &[u8],
8542    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8543        let avail_len = __input.len();
8544        let mut payload_buf = [0; Self::ENCODED_LEN];
8545        let mut buf = if avail_len < Self::ENCODED_LEN {
8546            payload_buf[0..avail_len].copy_from_slice(__input);
8547            Bytes::new(&payload_buf)
8548        } else {
8549            Bytes::new(__input)
8550        };
8551        let mut __struct = Self::default();
8552        __struct.id = buf.get_u32_le();
8553        __struct.target_system = buf.get_u8();
8554        __struct.target_component = buf.get_u8();
8555        __struct.bus = buf.get_u8();
8556        __struct.len = buf.get_u8();
8557        for v in &mut __struct.data {
8558            let val = buf.get_u8();
8559            *v = val;
8560        }
8561        Ok(__struct)
8562    }
8563    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8564        let mut __tmp = BytesMut::new(bytes);
8565        #[allow(clippy::absurd_extreme_comparisons)]
8566        #[allow(unused_comparisons)]
8567        if __tmp.remaining() < Self::ENCODED_LEN {
8568            panic!(
8569                "buffer is too small (need {} bytes, but got {})",
8570                Self::ENCODED_LEN,
8571                __tmp.remaining(),
8572            )
8573        }
8574        __tmp.put_u32_le(self.id);
8575        __tmp.put_u8(self.target_system);
8576        __tmp.put_u8(self.target_component);
8577        __tmp.put_u8(self.bus);
8578        __tmp.put_u8(self.len);
8579        for val in &self.data {
8580            __tmp.put_u8(*val);
8581        }
8582        if matches!(version, MavlinkVersion::V2) {
8583            let len = __tmp.len();
8584            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8585        } else {
8586            __tmp.len()
8587        }
8588    }
8589}
8590#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8591#[doc = ""]
8592#[doc = "ID: 336"]
8593#[derive(Debug, Clone, PartialEq)]
8594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8596#[cfg_attr(feature = "ts", derive(TS))]
8597#[cfg_attr(feature = "ts", ts(export))]
8598pub struct CELLULAR_CONFIG_DATA {
8599    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8600    pub enable_lte: u8,
8601    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8602    pub enable_pin: u8,
8603    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8604    #[cfg_attr(feature = "ts", ts(type = "string"))]
8605    pub pin: CharArray<16>,
8606    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8607    #[cfg_attr(feature = "ts", ts(type = "string"))]
8608    pub new_pin: CharArray<16>,
8609    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8610    #[cfg_attr(feature = "ts", ts(type = "string"))]
8611    pub apn: CharArray<32>,
8612    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8613    #[cfg_attr(feature = "ts", ts(type = "string"))]
8614    pub puk: CharArray<16>,
8615    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8616    pub roaming: u8,
8617    #[doc = "Message acceptance response (sent back to GS)."]
8618    pub response: CellularConfigResponse,
8619}
8620impl CELLULAR_CONFIG_DATA {
8621    pub const ENCODED_LEN: usize = 84usize;
8622    pub const DEFAULT: Self = Self {
8623        enable_lte: 0_u8,
8624        enable_pin: 0_u8,
8625        pin: CharArray::new([0_u8; 16usize]),
8626        new_pin: CharArray::new([0_u8; 16usize]),
8627        apn: CharArray::new([0_u8; 32usize]),
8628        puk: CharArray::new([0_u8; 16usize]),
8629        roaming: 0_u8,
8630        response: CellularConfigResponse::DEFAULT,
8631    };
8632    #[cfg(feature = "arbitrary")]
8633    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8634        use arbitrary::{Arbitrary, Unstructured};
8635        let mut buf = [0u8; 1024];
8636        rng.fill_bytes(&mut buf);
8637        let mut unstructured = Unstructured::new(&buf);
8638        Self::arbitrary(&mut unstructured).unwrap_or_default()
8639    }
8640}
8641impl Default for CELLULAR_CONFIG_DATA {
8642    fn default() -> Self {
8643        Self::DEFAULT.clone()
8644    }
8645}
8646impl MessageData for CELLULAR_CONFIG_DATA {
8647    type Message = MavMessage;
8648    const ID: u32 = 336u32;
8649    const NAME: &'static str = "CELLULAR_CONFIG";
8650    const EXTRA_CRC: u8 = 245u8;
8651    const ENCODED_LEN: usize = 84usize;
8652    fn deser(
8653        _version: MavlinkVersion,
8654        __input: &[u8],
8655    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8656        let avail_len = __input.len();
8657        let mut payload_buf = [0; Self::ENCODED_LEN];
8658        let mut buf = if avail_len < Self::ENCODED_LEN {
8659            payload_buf[0..avail_len].copy_from_slice(__input);
8660            Bytes::new(&payload_buf)
8661        } else {
8662            Bytes::new(__input)
8663        };
8664        let mut __struct = Self::default();
8665        __struct.enable_lte = buf.get_u8();
8666        __struct.enable_pin = buf.get_u8();
8667        let mut tmp = [0_u8; 16usize];
8668        for v in &mut tmp {
8669            *v = buf.get_u8();
8670        }
8671        __struct.pin = CharArray::new(tmp);
8672        let mut tmp = [0_u8; 16usize];
8673        for v in &mut tmp {
8674            *v = buf.get_u8();
8675        }
8676        __struct.new_pin = CharArray::new(tmp);
8677        let mut tmp = [0_u8; 32usize];
8678        for v in &mut tmp {
8679            *v = buf.get_u8();
8680        }
8681        __struct.apn = CharArray::new(tmp);
8682        let mut tmp = [0_u8; 16usize];
8683        for v in &mut tmp {
8684            *v = buf.get_u8();
8685        }
8686        __struct.puk = CharArray::new(tmp);
8687        __struct.roaming = buf.get_u8();
8688        let tmp = buf.get_u8();
8689        __struct.response =
8690            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8691                enum_type: "CellularConfigResponse",
8692                value: tmp as u64,
8693            })?;
8694        Ok(__struct)
8695    }
8696    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8697        let mut __tmp = BytesMut::new(bytes);
8698        #[allow(clippy::absurd_extreme_comparisons)]
8699        #[allow(unused_comparisons)]
8700        if __tmp.remaining() < Self::ENCODED_LEN {
8701            panic!(
8702                "buffer is too small (need {} bytes, but got {})",
8703                Self::ENCODED_LEN,
8704                __tmp.remaining(),
8705            )
8706        }
8707        __tmp.put_u8(self.enable_lte);
8708        __tmp.put_u8(self.enable_pin);
8709        for val in &self.pin {
8710            __tmp.put_u8(*val);
8711        }
8712        for val in &self.new_pin {
8713            __tmp.put_u8(*val);
8714        }
8715        for val in &self.apn {
8716            __tmp.put_u8(*val);
8717        }
8718        for val in &self.puk {
8719            __tmp.put_u8(*val);
8720        }
8721        __tmp.put_u8(self.roaming);
8722        __tmp.put_u8(self.response as u8);
8723        if matches!(version, MavlinkVersion::V2) {
8724            let len = __tmp.len();
8725            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8726        } else {
8727            __tmp.len()
8728        }
8729    }
8730}
8731#[doc = "Report current used cellular network status."]
8732#[doc = ""]
8733#[doc = "ID: 334"]
8734#[derive(Debug, Clone, PartialEq)]
8735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8737#[cfg_attr(feature = "ts", derive(TS))]
8738#[cfg_attr(feature = "ts", ts(export))]
8739pub struct CELLULAR_STATUS_DATA {
8740    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8741    pub mcc: u16,
8742    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8743    pub mnc: u16,
8744    #[doc = "Location area code. If unknown, set to 0"]
8745    pub lac: u16,
8746    #[doc = "Cellular modem status"]
8747    pub status: CellularStatusFlag,
8748    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8749    pub failure_reason: CellularNetworkFailedReason,
8750    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8751    pub mavtype: CellularNetworkRadioType,
8752    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8753    pub quality: u8,
8754}
8755impl CELLULAR_STATUS_DATA {
8756    pub const ENCODED_LEN: usize = 10usize;
8757    pub const DEFAULT: Self = Self {
8758        mcc: 0_u16,
8759        mnc: 0_u16,
8760        lac: 0_u16,
8761        status: CellularStatusFlag::DEFAULT,
8762        failure_reason: CellularNetworkFailedReason::DEFAULT,
8763        mavtype: CellularNetworkRadioType::DEFAULT,
8764        quality: 0_u8,
8765    };
8766    #[cfg(feature = "arbitrary")]
8767    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8768        use arbitrary::{Arbitrary, Unstructured};
8769        let mut buf = [0u8; 1024];
8770        rng.fill_bytes(&mut buf);
8771        let mut unstructured = Unstructured::new(&buf);
8772        Self::arbitrary(&mut unstructured).unwrap_or_default()
8773    }
8774}
8775impl Default for CELLULAR_STATUS_DATA {
8776    fn default() -> Self {
8777        Self::DEFAULT.clone()
8778    }
8779}
8780impl MessageData for CELLULAR_STATUS_DATA {
8781    type Message = MavMessage;
8782    const ID: u32 = 334u32;
8783    const NAME: &'static str = "CELLULAR_STATUS";
8784    const EXTRA_CRC: u8 = 72u8;
8785    const ENCODED_LEN: usize = 10usize;
8786    fn deser(
8787        _version: MavlinkVersion,
8788        __input: &[u8],
8789    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8790        let avail_len = __input.len();
8791        let mut payload_buf = [0; Self::ENCODED_LEN];
8792        let mut buf = if avail_len < Self::ENCODED_LEN {
8793            payload_buf[0..avail_len].copy_from_slice(__input);
8794            Bytes::new(&payload_buf)
8795        } else {
8796            Bytes::new(__input)
8797        };
8798        let mut __struct = Self::default();
8799        __struct.mcc = buf.get_u16_le();
8800        __struct.mnc = buf.get_u16_le();
8801        __struct.lac = buf.get_u16_le();
8802        let tmp = buf.get_u8();
8803        __struct.status =
8804            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8805                enum_type: "CellularStatusFlag",
8806                value: tmp as u64,
8807            })?;
8808        let tmp = buf.get_u8();
8809        __struct.failure_reason =
8810            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8811                enum_type: "CellularNetworkFailedReason",
8812                value: tmp as u64,
8813            })?;
8814        let tmp = buf.get_u8();
8815        __struct.mavtype =
8816            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8817                enum_type: "CellularNetworkRadioType",
8818                value: tmp as u64,
8819            })?;
8820        __struct.quality = buf.get_u8();
8821        Ok(__struct)
8822    }
8823    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8824        let mut __tmp = BytesMut::new(bytes);
8825        #[allow(clippy::absurd_extreme_comparisons)]
8826        #[allow(unused_comparisons)]
8827        if __tmp.remaining() < Self::ENCODED_LEN {
8828            panic!(
8829                "buffer is too small (need {} bytes, but got {})",
8830                Self::ENCODED_LEN,
8831                __tmp.remaining(),
8832            )
8833        }
8834        __tmp.put_u16_le(self.mcc);
8835        __tmp.put_u16_le(self.mnc);
8836        __tmp.put_u16_le(self.lac);
8837        __tmp.put_u8(self.status as u8);
8838        __tmp.put_u8(self.failure_reason as u8);
8839        __tmp.put_u8(self.mavtype as u8);
8840        __tmp.put_u8(self.quality);
8841        if matches!(version, MavlinkVersion::V2) {
8842            let len = __tmp.len();
8843            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8844        } else {
8845            __tmp.len()
8846        }
8847    }
8848}
8849#[doc = "Request to control this MAV."]
8850#[doc = ""]
8851#[doc = "ID: 5"]
8852#[derive(Debug, Clone, PartialEq)]
8853#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8854#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8855#[cfg_attr(feature = "ts", derive(TS))]
8856#[cfg_attr(feature = "ts", ts(export))]
8857pub struct CHANGE_OPERATOR_CONTROL_DATA {
8858    #[doc = "System the GCS requests control for"]
8859    pub target_system: u8,
8860    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8861    pub control_request: u8,
8862    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8863    pub version: u8,
8864    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8865    #[cfg_attr(feature = "ts", ts(type = "string"))]
8866    pub passkey: CharArray<25>,
8867}
8868impl CHANGE_OPERATOR_CONTROL_DATA {
8869    pub const ENCODED_LEN: usize = 28usize;
8870    pub const DEFAULT: Self = Self {
8871        target_system: 0_u8,
8872        control_request: 0_u8,
8873        version: 0_u8,
8874        passkey: CharArray::new([0_u8; 25usize]),
8875    };
8876    #[cfg(feature = "arbitrary")]
8877    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8878        use arbitrary::{Arbitrary, Unstructured};
8879        let mut buf = [0u8; 1024];
8880        rng.fill_bytes(&mut buf);
8881        let mut unstructured = Unstructured::new(&buf);
8882        Self::arbitrary(&mut unstructured).unwrap_or_default()
8883    }
8884}
8885impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8886    fn default() -> Self {
8887        Self::DEFAULT.clone()
8888    }
8889}
8890impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8891    type Message = MavMessage;
8892    const ID: u32 = 5u32;
8893    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8894    const EXTRA_CRC: u8 = 217u8;
8895    const ENCODED_LEN: usize = 28usize;
8896    fn deser(
8897        _version: MavlinkVersion,
8898        __input: &[u8],
8899    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8900        let avail_len = __input.len();
8901        let mut payload_buf = [0; Self::ENCODED_LEN];
8902        let mut buf = if avail_len < Self::ENCODED_LEN {
8903            payload_buf[0..avail_len].copy_from_slice(__input);
8904            Bytes::new(&payload_buf)
8905        } else {
8906            Bytes::new(__input)
8907        };
8908        let mut __struct = Self::default();
8909        __struct.target_system = buf.get_u8();
8910        __struct.control_request = buf.get_u8();
8911        __struct.version = buf.get_u8();
8912        let mut tmp = [0_u8; 25usize];
8913        for v in &mut tmp {
8914            *v = buf.get_u8();
8915        }
8916        __struct.passkey = CharArray::new(tmp);
8917        Ok(__struct)
8918    }
8919    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8920        let mut __tmp = BytesMut::new(bytes);
8921        #[allow(clippy::absurd_extreme_comparisons)]
8922        #[allow(unused_comparisons)]
8923        if __tmp.remaining() < Self::ENCODED_LEN {
8924            panic!(
8925                "buffer is too small (need {} bytes, but got {})",
8926                Self::ENCODED_LEN,
8927                __tmp.remaining(),
8928            )
8929        }
8930        __tmp.put_u8(self.target_system);
8931        __tmp.put_u8(self.control_request);
8932        __tmp.put_u8(self.version);
8933        for val in &self.passkey {
8934            __tmp.put_u8(*val);
8935        }
8936        if matches!(version, MavlinkVersion::V2) {
8937            let len = __tmp.len();
8938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8939        } else {
8940            __tmp.len()
8941        }
8942    }
8943}
8944#[doc = "Accept / deny control of this MAV."]
8945#[doc = ""]
8946#[doc = "ID: 6"]
8947#[derive(Debug, Clone, PartialEq)]
8948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8949#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8950#[cfg_attr(feature = "ts", derive(TS))]
8951#[cfg_attr(feature = "ts", ts(export))]
8952pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8953    #[doc = "ID of the GCS this message"]
8954    pub gcs_system_id: u8,
8955    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8956    pub control_request: u8,
8957    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8958    pub ack: u8,
8959}
8960impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8961    pub const ENCODED_LEN: usize = 3usize;
8962    pub const DEFAULT: Self = Self {
8963        gcs_system_id: 0_u8,
8964        control_request: 0_u8,
8965        ack: 0_u8,
8966    };
8967    #[cfg(feature = "arbitrary")]
8968    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8969        use arbitrary::{Arbitrary, Unstructured};
8970        let mut buf = [0u8; 1024];
8971        rng.fill_bytes(&mut buf);
8972        let mut unstructured = Unstructured::new(&buf);
8973        Self::arbitrary(&mut unstructured).unwrap_or_default()
8974    }
8975}
8976impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8977    fn default() -> Self {
8978        Self::DEFAULT.clone()
8979    }
8980}
8981impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8982    type Message = MavMessage;
8983    const ID: u32 = 6u32;
8984    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8985    const EXTRA_CRC: u8 = 104u8;
8986    const ENCODED_LEN: usize = 3usize;
8987    fn deser(
8988        _version: MavlinkVersion,
8989        __input: &[u8],
8990    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8991        let avail_len = __input.len();
8992        let mut payload_buf = [0; Self::ENCODED_LEN];
8993        let mut buf = if avail_len < Self::ENCODED_LEN {
8994            payload_buf[0..avail_len].copy_from_slice(__input);
8995            Bytes::new(&payload_buf)
8996        } else {
8997            Bytes::new(__input)
8998        };
8999        let mut __struct = Self::default();
9000        __struct.gcs_system_id = buf.get_u8();
9001        __struct.control_request = buf.get_u8();
9002        __struct.ack = buf.get_u8();
9003        Ok(__struct)
9004    }
9005    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9006        let mut __tmp = BytesMut::new(bytes);
9007        #[allow(clippy::absurd_extreme_comparisons)]
9008        #[allow(unused_comparisons)]
9009        if __tmp.remaining() < Self::ENCODED_LEN {
9010            panic!(
9011                "buffer is too small (need {} bytes, but got {})",
9012                Self::ENCODED_LEN,
9013                __tmp.remaining(),
9014            )
9015        }
9016        __tmp.put_u8(self.gcs_system_id);
9017        __tmp.put_u8(self.control_request);
9018        __tmp.put_u8(self.ack);
9019        if matches!(version, MavlinkVersion::V2) {
9020            let len = __tmp.len();
9021            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9022        } else {
9023            __tmp.len()
9024        }
9025    }
9026}
9027#[doc = "Information about a potential collision."]
9028#[doc = ""]
9029#[doc = "ID: 247"]
9030#[derive(Debug, Clone, PartialEq)]
9031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9032#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9033#[cfg_attr(feature = "ts", derive(TS))]
9034#[cfg_attr(feature = "ts", ts(export))]
9035pub struct COLLISION_DATA {
9036    #[doc = "Unique identifier, domain based on src field"]
9037    pub id: u32,
9038    #[doc = "Estimated time until collision occurs"]
9039    pub time_to_minimum_delta: f32,
9040    #[doc = "Closest vertical distance between vehicle and object"]
9041    pub altitude_minimum_delta: f32,
9042    #[doc = "Closest horizontal distance between vehicle and object"]
9043    pub horizontal_minimum_delta: f32,
9044    #[doc = "Collision data source"]
9045    pub src: MavCollisionSrc,
9046    #[doc = "Action that is being taken to avoid this collision"]
9047    pub action: MavCollisionAction,
9048    #[doc = "How concerned the aircraft is about this collision"]
9049    pub threat_level: MavCollisionThreatLevel,
9050}
9051impl COLLISION_DATA {
9052    pub const ENCODED_LEN: usize = 19usize;
9053    pub const DEFAULT: Self = Self {
9054        id: 0_u32,
9055        time_to_minimum_delta: 0.0_f32,
9056        altitude_minimum_delta: 0.0_f32,
9057        horizontal_minimum_delta: 0.0_f32,
9058        src: MavCollisionSrc::DEFAULT,
9059        action: MavCollisionAction::DEFAULT,
9060        threat_level: MavCollisionThreatLevel::DEFAULT,
9061    };
9062    #[cfg(feature = "arbitrary")]
9063    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9064        use arbitrary::{Arbitrary, Unstructured};
9065        let mut buf = [0u8; 1024];
9066        rng.fill_bytes(&mut buf);
9067        let mut unstructured = Unstructured::new(&buf);
9068        Self::arbitrary(&mut unstructured).unwrap_or_default()
9069    }
9070}
9071impl Default for COLLISION_DATA {
9072    fn default() -> Self {
9073        Self::DEFAULT.clone()
9074    }
9075}
9076impl MessageData for COLLISION_DATA {
9077    type Message = MavMessage;
9078    const ID: u32 = 247u32;
9079    const NAME: &'static str = "COLLISION";
9080    const EXTRA_CRC: u8 = 81u8;
9081    const ENCODED_LEN: usize = 19usize;
9082    fn deser(
9083        _version: MavlinkVersion,
9084        __input: &[u8],
9085    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9086        let avail_len = __input.len();
9087        let mut payload_buf = [0; Self::ENCODED_LEN];
9088        let mut buf = if avail_len < Self::ENCODED_LEN {
9089            payload_buf[0..avail_len].copy_from_slice(__input);
9090            Bytes::new(&payload_buf)
9091        } else {
9092            Bytes::new(__input)
9093        };
9094        let mut __struct = Self::default();
9095        __struct.id = buf.get_u32_le();
9096        __struct.time_to_minimum_delta = buf.get_f32_le();
9097        __struct.altitude_minimum_delta = buf.get_f32_le();
9098        __struct.horizontal_minimum_delta = buf.get_f32_le();
9099        let tmp = buf.get_u8();
9100        __struct.src =
9101            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9102                enum_type: "MavCollisionSrc",
9103                value: tmp as u64,
9104            })?;
9105        let tmp = buf.get_u8();
9106        __struct.action =
9107            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9108                enum_type: "MavCollisionAction",
9109                value: tmp as u64,
9110            })?;
9111        let tmp = buf.get_u8();
9112        __struct.threat_level =
9113            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9114                enum_type: "MavCollisionThreatLevel",
9115                value: tmp as u64,
9116            })?;
9117        Ok(__struct)
9118    }
9119    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9120        let mut __tmp = BytesMut::new(bytes);
9121        #[allow(clippy::absurd_extreme_comparisons)]
9122        #[allow(unused_comparisons)]
9123        if __tmp.remaining() < Self::ENCODED_LEN {
9124            panic!(
9125                "buffer is too small (need {} bytes, but got {})",
9126                Self::ENCODED_LEN,
9127                __tmp.remaining(),
9128            )
9129        }
9130        __tmp.put_u32_le(self.id);
9131        __tmp.put_f32_le(self.time_to_minimum_delta);
9132        __tmp.put_f32_le(self.altitude_minimum_delta);
9133        __tmp.put_f32_le(self.horizontal_minimum_delta);
9134        __tmp.put_u8(self.src as u8);
9135        __tmp.put_u8(self.action as u8);
9136        __tmp.put_u8(self.threat_level as u8);
9137        if matches!(version, MavlinkVersion::V2) {
9138            let len = __tmp.len();
9139            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9140        } else {
9141            __tmp.len()
9142        }
9143    }
9144}
9145#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9146#[doc = ""]
9147#[doc = "ID: 77"]
9148#[derive(Debug, Clone, PartialEq)]
9149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9150#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9151#[cfg_attr(feature = "ts", derive(TS))]
9152#[cfg_attr(feature = "ts", ts(export))]
9153pub struct COMMAND_ACK_DATA {
9154    #[doc = "Command ID (of acknowledged command)."]
9155    pub command: MavCmd,
9156    #[doc = "Result of command."]
9157    pub result: MavResult,
9158    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9159    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9160    pub progress: u8,
9161    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9162    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9163    pub result_param2: i32,
9164    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9165    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9166    pub target_system: u8,
9167    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9168    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9169    pub target_component: u8,
9170}
9171impl COMMAND_ACK_DATA {
9172    pub const ENCODED_LEN: usize = 10usize;
9173    pub const DEFAULT: Self = Self {
9174        command: MavCmd::DEFAULT,
9175        result: MavResult::DEFAULT,
9176        progress: 0_u8,
9177        result_param2: 0_i32,
9178        target_system: 0_u8,
9179        target_component: 0_u8,
9180    };
9181    #[cfg(feature = "arbitrary")]
9182    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9183        use arbitrary::{Arbitrary, Unstructured};
9184        let mut buf = [0u8; 1024];
9185        rng.fill_bytes(&mut buf);
9186        let mut unstructured = Unstructured::new(&buf);
9187        Self::arbitrary(&mut unstructured).unwrap_or_default()
9188    }
9189}
9190impl Default for COMMAND_ACK_DATA {
9191    fn default() -> Self {
9192        Self::DEFAULT.clone()
9193    }
9194}
9195impl MessageData for COMMAND_ACK_DATA {
9196    type Message = MavMessage;
9197    const ID: u32 = 77u32;
9198    const NAME: &'static str = "COMMAND_ACK";
9199    const EXTRA_CRC: u8 = 143u8;
9200    const ENCODED_LEN: usize = 10usize;
9201    fn deser(
9202        _version: MavlinkVersion,
9203        __input: &[u8],
9204    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9205        let avail_len = __input.len();
9206        let mut payload_buf = [0; Self::ENCODED_LEN];
9207        let mut buf = if avail_len < Self::ENCODED_LEN {
9208            payload_buf[0..avail_len].copy_from_slice(__input);
9209            Bytes::new(&payload_buf)
9210        } else {
9211            Bytes::new(__input)
9212        };
9213        let mut __struct = Self::default();
9214        let tmp = buf.get_u16_le();
9215        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9216            ::mavlink_core::error::ParserError::InvalidEnum {
9217                enum_type: "MavCmd",
9218                value: tmp as u64,
9219            },
9220        )?;
9221        let tmp = buf.get_u8();
9222        __struct.result =
9223            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9224                enum_type: "MavResult",
9225                value: tmp as u64,
9226            })?;
9227        __struct.progress = buf.get_u8();
9228        __struct.result_param2 = buf.get_i32_le();
9229        __struct.target_system = buf.get_u8();
9230        __struct.target_component = buf.get_u8();
9231        Ok(__struct)
9232    }
9233    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9234        let mut __tmp = BytesMut::new(bytes);
9235        #[allow(clippy::absurd_extreme_comparisons)]
9236        #[allow(unused_comparisons)]
9237        if __tmp.remaining() < Self::ENCODED_LEN {
9238            panic!(
9239                "buffer is too small (need {} bytes, but got {})",
9240                Self::ENCODED_LEN,
9241                __tmp.remaining(),
9242            )
9243        }
9244        __tmp.put_u16_le(self.command as u16);
9245        __tmp.put_u8(self.result as u8);
9246        if matches!(version, MavlinkVersion::V2) {
9247            __tmp.put_u8(self.progress);
9248            __tmp.put_i32_le(self.result_param2);
9249            __tmp.put_u8(self.target_system);
9250            __tmp.put_u8(self.target_component);
9251            let len = __tmp.len();
9252            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9253        } else {
9254            __tmp.len()
9255        }
9256    }
9257}
9258#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9259#[doc = ""]
9260#[doc = "ID: 80"]
9261#[derive(Debug, Clone, PartialEq)]
9262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9264#[cfg_attr(feature = "ts", derive(TS))]
9265#[cfg_attr(feature = "ts", ts(export))]
9266pub struct COMMAND_CANCEL_DATA {
9267    #[doc = "Command ID (of command to cancel)."]
9268    pub command: MavCmd,
9269    #[doc = "System executing long running command. Should not be broadcast (0)."]
9270    pub target_system: u8,
9271    #[doc = "Component executing long running command."]
9272    pub target_component: u8,
9273}
9274impl COMMAND_CANCEL_DATA {
9275    pub const ENCODED_LEN: usize = 4usize;
9276    pub const DEFAULT: Self = Self {
9277        command: MavCmd::DEFAULT,
9278        target_system: 0_u8,
9279        target_component: 0_u8,
9280    };
9281    #[cfg(feature = "arbitrary")]
9282    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9283        use arbitrary::{Arbitrary, Unstructured};
9284        let mut buf = [0u8; 1024];
9285        rng.fill_bytes(&mut buf);
9286        let mut unstructured = Unstructured::new(&buf);
9287        Self::arbitrary(&mut unstructured).unwrap_or_default()
9288    }
9289}
9290impl Default for COMMAND_CANCEL_DATA {
9291    fn default() -> Self {
9292        Self::DEFAULT.clone()
9293    }
9294}
9295impl MessageData for COMMAND_CANCEL_DATA {
9296    type Message = MavMessage;
9297    const ID: u32 = 80u32;
9298    const NAME: &'static str = "COMMAND_CANCEL";
9299    const EXTRA_CRC: u8 = 14u8;
9300    const ENCODED_LEN: usize = 4usize;
9301    fn deser(
9302        _version: MavlinkVersion,
9303        __input: &[u8],
9304    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9305        let avail_len = __input.len();
9306        let mut payload_buf = [0; Self::ENCODED_LEN];
9307        let mut buf = if avail_len < Self::ENCODED_LEN {
9308            payload_buf[0..avail_len].copy_from_slice(__input);
9309            Bytes::new(&payload_buf)
9310        } else {
9311            Bytes::new(__input)
9312        };
9313        let mut __struct = Self::default();
9314        let tmp = buf.get_u16_le();
9315        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9316            ::mavlink_core::error::ParserError::InvalidEnum {
9317                enum_type: "MavCmd",
9318                value: tmp as u64,
9319            },
9320        )?;
9321        __struct.target_system = buf.get_u8();
9322        __struct.target_component = buf.get_u8();
9323        Ok(__struct)
9324    }
9325    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9326        let mut __tmp = BytesMut::new(bytes);
9327        #[allow(clippy::absurd_extreme_comparisons)]
9328        #[allow(unused_comparisons)]
9329        if __tmp.remaining() < Self::ENCODED_LEN {
9330            panic!(
9331                "buffer is too small (need {} bytes, but got {})",
9332                Self::ENCODED_LEN,
9333                __tmp.remaining(),
9334            )
9335        }
9336        __tmp.put_u16_le(self.command as u16);
9337        __tmp.put_u8(self.target_system);
9338        __tmp.put_u8(self.target_component);
9339        if matches!(version, MavlinkVersion::V2) {
9340            let len = __tmp.len();
9341            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9342        } else {
9343            __tmp.len()
9344        }
9345    }
9346}
9347#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9348#[doc = ""]
9349#[doc = "ID: 75"]
9350#[derive(Debug, Clone, PartialEq)]
9351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9352#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9353#[cfg_attr(feature = "ts", derive(TS))]
9354#[cfg_attr(feature = "ts", ts(export))]
9355pub struct COMMAND_INT_DATA {
9356    #[doc = "PARAM1, see MAV_CMD enum"]
9357    pub param1: f32,
9358    #[doc = "PARAM2, see MAV_CMD enum"]
9359    pub param2: f32,
9360    #[doc = "PARAM3, see MAV_CMD enum"]
9361    pub param3: f32,
9362    #[doc = "PARAM4, see MAV_CMD enum"]
9363    pub param4: f32,
9364    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9365    pub x: i32,
9366    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9367    pub y: i32,
9368    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9369    pub z: f32,
9370    #[doc = "The scheduled action for the mission item."]
9371    pub command: MavCmd,
9372    #[doc = "System ID"]
9373    pub target_system: u8,
9374    #[doc = "Component ID"]
9375    pub target_component: u8,
9376    #[doc = "The coordinate system of the COMMAND."]
9377    pub frame: MavFrame,
9378    #[doc = "Not used."]
9379    pub current: u8,
9380    #[doc = "Not used (set 0)."]
9381    pub autocontinue: u8,
9382}
9383impl COMMAND_INT_DATA {
9384    pub const ENCODED_LEN: usize = 35usize;
9385    pub const DEFAULT: Self = Self {
9386        param1: 0.0_f32,
9387        param2: 0.0_f32,
9388        param3: 0.0_f32,
9389        param4: 0.0_f32,
9390        x: 0_i32,
9391        y: 0_i32,
9392        z: 0.0_f32,
9393        command: MavCmd::DEFAULT,
9394        target_system: 0_u8,
9395        target_component: 0_u8,
9396        frame: MavFrame::DEFAULT,
9397        current: 0_u8,
9398        autocontinue: 0_u8,
9399    };
9400    #[cfg(feature = "arbitrary")]
9401    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9402        use arbitrary::{Arbitrary, Unstructured};
9403        let mut buf = [0u8; 1024];
9404        rng.fill_bytes(&mut buf);
9405        let mut unstructured = Unstructured::new(&buf);
9406        Self::arbitrary(&mut unstructured).unwrap_or_default()
9407    }
9408}
9409impl Default for COMMAND_INT_DATA {
9410    fn default() -> Self {
9411        Self::DEFAULT.clone()
9412    }
9413}
9414impl MessageData for COMMAND_INT_DATA {
9415    type Message = MavMessage;
9416    const ID: u32 = 75u32;
9417    const NAME: &'static str = "COMMAND_INT";
9418    const EXTRA_CRC: u8 = 158u8;
9419    const ENCODED_LEN: usize = 35usize;
9420    fn deser(
9421        _version: MavlinkVersion,
9422        __input: &[u8],
9423    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9424        let avail_len = __input.len();
9425        let mut payload_buf = [0; Self::ENCODED_LEN];
9426        let mut buf = if avail_len < Self::ENCODED_LEN {
9427            payload_buf[0..avail_len].copy_from_slice(__input);
9428            Bytes::new(&payload_buf)
9429        } else {
9430            Bytes::new(__input)
9431        };
9432        let mut __struct = Self::default();
9433        __struct.param1 = buf.get_f32_le();
9434        __struct.param2 = buf.get_f32_le();
9435        __struct.param3 = buf.get_f32_le();
9436        __struct.param4 = buf.get_f32_le();
9437        __struct.x = buf.get_i32_le();
9438        __struct.y = buf.get_i32_le();
9439        __struct.z = buf.get_f32_le();
9440        let tmp = buf.get_u16_le();
9441        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9442            ::mavlink_core::error::ParserError::InvalidEnum {
9443                enum_type: "MavCmd",
9444                value: tmp as u64,
9445            },
9446        )?;
9447        __struct.target_system = buf.get_u8();
9448        __struct.target_component = buf.get_u8();
9449        let tmp = buf.get_u8();
9450        __struct.frame =
9451            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9452                enum_type: "MavFrame",
9453                value: tmp as u64,
9454            })?;
9455        __struct.current = buf.get_u8();
9456        __struct.autocontinue = buf.get_u8();
9457        Ok(__struct)
9458    }
9459    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9460        let mut __tmp = BytesMut::new(bytes);
9461        #[allow(clippy::absurd_extreme_comparisons)]
9462        #[allow(unused_comparisons)]
9463        if __tmp.remaining() < Self::ENCODED_LEN {
9464            panic!(
9465                "buffer is too small (need {} bytes, but got {})",
9466                Self::ENCODED_LEN,
9467                __tmp.remaining(),
9468            )
9469        }
9470        __tmp.put_f32_le(self.param1);
9471        __tmp.put_f32_le(self.param2);
9472        __tmp.put_f32_le(self.param3);
9473        __tmp.put_f32_le(self.param4);
9474        __tmp.put_i32_le(self.x);
9475        __tmp.put_i32_le(self.y);
9476        __tmp.put_f32_le(self.z);
9477        __tmp.put_u16_le(self.command as u16);
9478        __tmp.put_u8(self.target_system);
9479        __tmp.put_u8(self.target_component);
9480        __tmp.put_u8(self.frame as u8);
9481        __tmp.put_u8(self.current);
9482        __tmp.put_u8(self.autocontinue);
9483        if matches!(version, MavlinkVersion::V2) {
9484            let len = __tmp.len();
9485            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9486        } else {
9487            __tmp.len()
9488        }
9489    }
9490}
9491#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9492#[doc = ""]
9493#[doc = "ID: 76"]
9494#[derive(Debug, Clone, PartialEq)]
9495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9497#[cfg_attr(feature = "ts", derive(TS))]
9498#[cfg_attr(feature = "ts", ts(export))]
9499pub struct COMMAND_LONG_DATA {
9500    #[doc = "Parameter 1 (for the specific command)."]
9501    pub param1: f32,
9502    #[doc = "Parameter 2 (for the specific command)."]
9503    pub param2: f32,
9504    #[doc = "Parameter 3 (for the specific command)."]
9505    pub param3: f32,
9506    #[doc = "Parameter 4 (for the specific command)."]
9507    pub param4: f32,
9508    #[doc = "Parameter 5 (for the specific command)."]
9509    pub param5: f32,
9510    #[doc = "Parameter 6 (for the specific command)."]
9511    pub param6: f32,
9512    #[doc = "Parameter 7 (for the specific command)."]
9513    pub param7: f32,
9514    #[doc = "Command ID (of command to send)."]
9515    pub command: MavCmd,
9516    #[doc = "System which should execute the command"]
9517    pub target_system: u8,
9518    #[doc = "Component which should execute the command, 0 for all components"]
9519    pub target_component: u8,
9520    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9521    pub confirmation: u8,
9522}
9523impl COMMAND_LONG_DATA {
9524    pub const ENCODED_LEN: usize = 33usize;
9525    pub const DEFAULT: Self = Self {
9526        param1: 0.0_f32,
9527        param2: 0.0_f32,
9528        param3: 0.0_f32,
9529        param4: 0.0_f32,
9530        param5: 0.0_f32,
9531        param6: 0.0_f32,
9532        param7: 0.0_f32,
9533        command: MavCmd::DEFAULT,
9534        target_system: 0_u8,
9535        target_component: 0_u8,
9536        confirmation: 0_u8,
9537    };
9538    #[cfg(feature = "arbitrary")]
9539    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9540        use arbitrary::{Arbitrary, Unstructured};
9541        let mut buf = [0u8; 1024];
9542        rng.fill_bytes(&mut buf);
9543        let mut unstructured = Unstructured::new(&buf);
9544        Self::arbitrary(&mut unstructured).unwrap_or_default()
9545    }
9546}
9547impl Default for COMMAND_LONG_DATA {
9548    fn default() -> Self {
9549        Self::DEFAULT.clone()
9550    }
9551}
9552impl MessageData for COMMAND_LONG_DATA {
9553    type Message = MavMessage;
9554    const ID: u32 = 76u32;
9555    const NAME: &'static str = "COMMAND_LONG";
9556    const EXTRA_CRC: u8 = 152u8;
9557    const ENCODED_LEN: usize = 33usize;
9558    fn deser(
9559        _version: MavlinkVersion,
9560        __input: &[u8],
9561    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9562        let avail_len = __input.len();
9563        let mut payload_buf = [0; Self::ENCODED_LEN];
9564        let mut buf = if avail_len < Self::ENCODED_LEN {
9565            payload_buf[0..avail_len].copy_from_slice(__input);
9566            Bytes::new(&payload_buf)
9567        } else {
9568            Bytes::new(__input)
9569        };
9570        let mut __struct = Self::default();
9571        __struct.param1 = buf.get_f32_le();
9572        __struct.param2 = buf.get_f32_le();
9573        __struct.param3 = buf.get_f32_le();
9574        __struct.param4 = buf.get_f32_le();
9575        __struct.param5 = buf.get_f32_le();
9576        __struct.param6 = buf.get_f32_le();
9577        __struct.param7 = buf.get_f32_le();
9578        let tmp = buf.get_u16_le();
9579        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9580            ::mavlink_core::error::ParserError::InvalidEnum {
9581                enum_type: "MavCmd",
9582                value: tmp as u64,
9583            },
9584        )?;
9585        __struct.target_system = buf.get_u8();
9586        __struct.target_component = buf.get_u8();
9587        __struct.confirmation = buf.get_u8();
9588        Ok(__struct)
9589    }
9590    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9591        let mut __tmp = BytesMut::new(bytes);
9592        #[allow(clippy::absurd_extreme_comparisons)]
9593        #[allow(unused_comparisons)]
9594        if __tmp.remaining() < Self::ENCODED_LEN {
9595            panic!(
9596                "buffer is too small (need {} bytes, but got {})",
9597                Self::ENCODED_LEN,
9598                __tmp.remaining(),
9599            )
9600        }
9601        __tmp.put_f32_le(self.param1);
9602        __tmp.put_f32_le(self.param2);
9603        __tmp.put_f32_le(self.param3);
9604        __tmp.put_f32_le(self.param4);
9605        __tmp.put_f32_le(self.param5);
9606        __tmp.put_f32_le(self.param6);
9607        __tmp.put_f32_le(self.param7);
9608        __tmp.put_u16_le(self.command as u16);
9609        __tmp.put_u8(self.target_system);
9610        __tmp.put_u8(self.target_component);
9611        __tmp.put_u8(self.confirmation);
9612        if matches!(version, MavlinkVersion::V2) {
9613            let len = __tmp.len();
9614            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9615        } else {
9616            __tmp.len()
9617        }
9618    }
9619}
9620#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9621#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9622#[doc = ""]
9623#[doc = "ID: 395"]
9624#[derive(Debug, Clone, PartialEq)]
9625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9627#[cfg_attr(feature = "ts", derive(TS))]
9628#[cfg_attr(feature = "ts", ts(export))]
9629pub struct COMPONENT_INFORMATION_DATA {
9630    #[doc = "Timestamp (time since system boot)."]
9631    pub time_boot_ms: u32,
9632    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9633    pub general_metadata_file_crc: u32,
9634    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9635    pub peripherals_metadata_file_crc: u32,
9636    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9637    #[cfg_attr(feature = "ts", ts(type = "string"))]
9638    pub general_metadata_uri: CharArray<100>,
9639    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9640    #[cfg_attr(feature = "ts", ts(type = "string"))]
9641    pub peripherals_metadata_uri: CharArray<100>,
9642}
9643impl COMPONENT_INFORMATION_DATA {
9644    pub const ENCODED_LEN: usize = 212usize;
9645    pub const DEFAULT: Self = Self {
9646        time_boot_ms: 0_u32,
9647        general_metadata_file_crc: 0_u32,
9648        peripherals_metadata_file_crc: 0_u32,
9649        general_metadata_uri: CharArray::new([0_u8; 100usize]),
9650        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
9651    };
9652    #[cfg(feature = "arbitrary")]
9653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9654        use arbitrary::{Arbitrary, Unstructured};
9655        let mut buf = [0u8; 1024];
9656        rng.fill_bytes(&mut buf);
9657        let mut unstructured = Unstructured::new(&buf);
9658        Self::arbitrary(&mut unstructured).unwrap_or_default()
9659    }
9660}
9661impl Default for COMPONENT_INFORMATION_DATA {
9662    fn default() -> Self {
9663        Self::DEFAULT.clone()
9664    }
9665}
9666impl MessageData for COMPONENT_INFORMATION_DATA {
9667    type Message = MavMessage;
9668    const ID: u32 = 395u32;
9669    const NAME: &'static str = "COMPONENT_INFORMATION";
9670    const EXTRA_CRC: u8 = 0u8;
9671    const ENCODED_LEN: usize = 212usize;
9672    fn deser(
9673        _version: MavlinkVersion,
9674        __input: &[u8],
9675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9676        let avail_len = __input.len();
9677        let mut payload_buf = [0; Self::ENCODED_LEN];
9678        let mut buf = if avail_len < Self::ENCODED_LEN {
9679            payload_buf[0..avail_len].copy_from_slice(__input);
9680            Bytes::new(&payload_buf)
9681        } else {
9682            Bytes::new(__input)
9683        };
9684        let mut __struct = Self::default();
9685        __struct.time_boot_ms = buf.get_u32_le();
9686        __struct.general_metadata_file_crc = buf.get_u32_le();
9687        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9688        let mut tmp = [0_u8; 100usize];
9689        for v in &mut tmp {
9690            *v = buf.get_u8();
9691        }
9692        __struct.general_metadata_uri = CharArray::new(tmp);
9693        let mut tmp = [0_u8; 100usize];
9694        for v in &mut tmp {
9695            *v = buf.get_u8();
9696        }
9697        __struct.peripherals_metadata_uri = CharArray::new(tmp);
9698        Ok(__struct)
9699    }
9700    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9701        let mut __tmp = BytesMut::new(bytes);
9702        #[allow(clippy::absurd_extreme_comparisons)]
9703        #[allow(unused_comparisons)]
9704        if __tmp.remaining() < Self::ENCODED_LEN {
9705            panic!(
9706                "buffer is too small (need {} bytes, but got {})",
9707                Self::ENCODED_LEN,
9708                __tmp.remaining(),
9709            )
9710        }
9711        __tmp.put_u32_le(self.time_boot_ms);
9712        __tmp.put_u32_le(self.general_metadata_file_crc);
9713        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9714        for val in &self.general_metadata_uri {
9715            __tmp.put_u8(*val);
9716        }
9717        for val in &self.peripherals_metadata_uri {
9718            __tmp.put_u8(*val);
9719        }
9720        if matches!(version, MavlinkVersion::V2) {
9721            let len = __tmp.len();
9722            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9723        } else {
9724            __tmp.len()
9725        }
9726    }
9727}
9728#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9729#[doc = ""]
9730#[doc = "ID: 396"]
9731#[derive(Debug, Clone, PartialEq)]
9732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9734#[cfg_attr(feature = "ts", derive(TS))]
9735#[cfg_attr(feature = "ts", ts(export))]
9736pub struct COMPONENT_INFORMATION_BASIC_DATA {
9737    #[doc = "Component capability flags"]
9738    pub capabilities: MavProtocolCapability,
9739    #[doc = "Timestamp (time since system boot)."]
9740    pub time_boot_ms: u32,
9741    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9742    pub time_manufacture_s: u32,
9743    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9744    #[cfg_attr(feature = "ts", ts(type = "string"))]
9745    pub vendor_name: CharArray<32>,
9746    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9747    #[cfg_attr(feature = "ts", ts(type = "string"))]
9748    pub model_name: CharArray<32>,
9749    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9750    #[cfg_attr(feature = "ts", ts(type = "string"))]
9751    pub software_version: CharArray<24>,
9752    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9753    #[cfg_attr(feature = "ts", ts(type = "string"))]
9754    pub hardware_version: CharArray<24>,
9755    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9756    #[cfg_attr(feature = "ts", ts(type = "string"))]
9757    pub serial_number: CharArray<32>,
9758}
9759impl COMPONENT_INFORMATION_BASIC_DATA {
9760    pub const ENCODED_LEN: usize = 160usize;
9761    pub const DEFAULT: Self = Self {
9762        capabilities: MavProtocolCapability::DEFAULT,
9763        time_boot_ms: 0_u32,
9764        time_manufacture_s: 0_u32,
9765        vendor_name: CharArray::new([0_u8; 32usize]),
9766        model_name: CharArray::new([0_u8; 32usize]),
9767        software_version: CharArray::new([0_u8; 24usize]),
9768        hardware_version: CharArray::new([0_u8; 24usize]),
9769        serial_number: CharArray::new([0_u8; 32usize]),
9770    };
9771    #[cfg(feature = "arbitrary")]
9772    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9773        use arbitrary::{Arbitrary, Unstructured};
9774        let mut buf = [0u8; 1024];
9775        rng.fill_bytes(&mut buf);
9776        let mut unstructured = Unstructured::new(&buf);
9777        Self::arbitrary(&mut unstructured).unwrap_or_default()
9778    }
9779}
9780impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9781    fn default() -> Self {
9782        Self::DEFAULT.clone()
9783    }
9784}
9785impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9786    type Message = MavMessage;
9787    const ID: u32 = 396u32;
9788    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9789    const EXTRA_CRC: u8 = 50u8;
9790    const ENCODED_LEN: usize = 160usize;
9791    fn deser(
9792        _version: MavlinkVersion,
9793        __input: &[u8],
9794    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9795        let avail_len = __input.len();
9796        let mut payload_buf = [0; Self::ENCODED_LEN];
9797        let mut buf = if avail_len < Self::ENCODED_LEN {
9798            payload_buf[0..avail_len].copy_from_slice(__input);
9799            Bytes::new(&payload_buf)
9800        } else {
9801            Bytes::new(__input)
9802        };
9803        let mut __struct = Self::default();
9804        let tmp = buf.get_u64_le();
9805        __struct.capabilities = MavProtocolCapability::from_bits(
9806            tmp as <MavProtocolCapability as Flags>::Bits,
9807        )
9808        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9809            flag_type: "MavProtocolCapability",
9810            value: tmp as u64,
9811        })?;
9812        __struct.time_boot_ms = buf.get_u32_le();
9813        __struct.time_manufacture_s = buf.get_u32_le();
9814        let mut tmp = [0_u8; 32usize];
9815        for v in &mut tmp {
9816            *v = buf.get_u8();
9817        }
9818        __struct.vendor_name = CharArray::new(tmp);
9819        let mut tmp = [0_u8; 32usize];
9820        for v in &mut tmp {
9821            *v = buf.get_u8();
9822        }
9823        __struct.model_name = CharArray::new(tmp);
9824        let mut tmp = [0_u8; 24usize];
9825        for v in &mut tmp {
9826            *v = buf.get_u8();
9827        }
9828        __struct.software_version = CharArray::new(tmp);
9829        let mut tmp = [0_u8; 24usize];
9830        for v in &mut tmp {
9831            *v = buf.get_u8();
9832        }
9833        __struct.hardware_version = CharArray::new(tmp);
9834        let mut tmp = [0_u8; 32usize];
9835        for v in &mut tmp {
9836            *v = buf.get_u8();
9837        }
9838        __struct.serial_number = CharArray::new(tmp);
9839        Ok(__struct)
9840    }
9841    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9842        let mut __tmp = BytesMut::new(bytes);
9843        #[allow(clippy::absurd_extreme_comparisons)]
9844        #[allow(unused_comparisons)]
9845        if __tmp.remaining() < Self::ENCODED_LEN {
9846            panic!(
9847                "buffer is too small (need {} bytes, but got {})",
9848                Self::ENCODED_LEN,
9849                __tmp.remaining(),
9850            )
9851        }
9852        __tmp.put_u64_le(self.capabilities.bits() as u64);
9853        __tmp.put_u32_le(self.time_boot_ms);
9854        __tmp.put_u32_le(self.time_manufacture_s);
9855        for val in &self.vendor_name {
9856            __tmp.put_u8(*val);
9857        }
9858        for val in &self.model_name {
9859            __tmp.put_u8(*val);
9860        }
9861        for val in &self.software_version {
9862            __tmp.put_u8(*val);
9863        }
9864        for val in &self.hardware_version {
9865            __tmp.put_u8(*val);
9866        }
9867        for val in &self.serial_number {
9868            __tmp.put_u8(*val);
9869        }
9870        if matches!(version, MavlinkVersion::V2) {
9871            let len = __tmp.len();
9872            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9873        } else {
9874            __tmp.len()
9875        }
9876    }
9877}
9878#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9879#[doc = ""]
9880#[doc = "ID: 397"]
9881#[derive(Debug, Clone, PartialEq)]
9882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9883#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9884#[cfg_attr(feature = "ts", derive(TS))]
9885#[cfg_attr(feature = "ts", ts(export))]
9886pub struct COMPONENT_METADATA_DATA {
9887    #[doc = "Timestamp (time since system boot)."]
9888    pub time_boot_ms: u32,
9889    #[doc = "CRC32 of the general metadata file."]
9890    pub file_crc: u32,
9891    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9892    #[cfg_attr(feature = "ts", ts(type = "string"))]
9893    pub uri: CharArray<100>,
9894}
9895impl COMPONENT_METADATA_DATA {
9896    pub const ENCODED_LEN: usize = 108usize;
9897    pub const DEFAULT: Self = Self {
9898        time_boot_ms: 0_u32,
9899        file_crc: 0_u32,
9900        uri: CharArray::new([0_u8; 100usize]),
9901    };
9902    #[cfg(feature = "arbitrary")]
9903    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9904        use arbitrary::{Arbitrary, Unstructured};
9905        let mut buf = [0u8; 1024];
9906        rng.fill_bytes(&mut buf);
9907        let mut unstructured = Unstructured::new(&buf);
9908        Self::arbitrary(&mut unstructured).unwrap_or_default()
9909    }
9910}
9911impl Default for COMPONENT_METADATA_DATA {
9912    fn default() -> Self {
9913        Self::DEFAULT.clone()
9914    }
9915}
9916impl MessageData for COMPONENT_METADATA_DATA {
9917    type Message = MavMessage;
9918    const ID: u32 = 397u32;
9919    const NAME: &'static str = "COMPONENT_METADATA";
9920    const EXTRA_CRC: u8 = 182u8;
9921    const ENCODED_LEN: usize = 108usize;
9922    fn deser(
9923        _version: MavlinkVersion,
9924        __input: &[u8],
9925    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9926        let avail_len = __input.len();
9927        let mut payload_buf = [0; Self::ENCODED_LEN];
9928        let mut buf = if avail_len < Self::ENCODED_LEN {
9929            payload_buf[0..avail_len].copy_from_slice(__input);
9930            Bytes::new(&payload_buf)
9931        } else {
9932            Bytes::new(__input)
9933        };
9934        let mut __struct = Self::default();
9935        __struct.time_boot_ms = buf.get_u32_le();
9936        __struct.file_crc = buf.get_u32_le();
9937        let mut tmp = [0_u8; 100usize];
9938        for v in &mut tmp {
9939            *v = buf.get_u8();
9940        }
9941        __struct.uri = CharArray::new(tmp);
9942        Ok(__struct)
9943    }
9944    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9945        let mut __tmp = BytesMut::new(bytes);
9946        #[allow(clippy::absurd_extreme_comparisons)]
9947        #[allow(unused_comparisons)]
9948        if __tmp.remaining() < Self::ENCODED_LEN {
9949            panic!(
9950                "buffer is too small (need {} bytes, but got {})",
9951                Self::ENCODED_LEN,
9952                __tmp.remaining(),
9953            )
9954        }
9955        __tmp.put_u32_le(self.time_boot_ms);
9956        __tmp.put_u32_le(self.file_crc);
9957        for val in &self.uri {
9958            __tmp.put_u8(*val);
9959        }
9960        if matches!(version, MavlinkVersion::V2) {
9961            let len = __tmp.len();
9962            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9963        } else {
9964            __tmp.len()
9965        }
9966    }
9967}
9968#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9969#[doc = ""]
9970#[doc = "ID: 146"]
9971#[derive(Debug, Clone, PartialEq)]
9972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9974#[cfg_attr(feature = "ts", derive(TS))]
9975#[cfg_attr(feature = "ts", ts(export))]
9976pub struct CONTROL_SYSTEM_STATE_DATA {
9977    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9978    pub time_usec: u64,
9979    #[doc = "X acceleration in body frame"]
9980    pub x_acc: f32,
9981    #[doc = "Y acceleration in body frame"]
9982    pub y_acc: f32,
9983    #[doc = "Z acceleration in body frame"]
9984    pub z_acc: f32,
9985    #[doc = "X velocity in body frame"]
9986    pub x_vel: f32,
9987    #[doc = "Y velocity in body frame"]
9988    pub y_vel: f32,
9989    #[doc = "Z velocity in body frame"]
9990    pub z_vel: f32,
9991    #[doc = "X position in local frame"]
9992    pub x_pos: f32,
9993    #[doc = "Y position in local frame"]
9994    pub y_pos: f32,
9995    #[doc = "Z position in local frame"]
9996    pub z_pos: f32,
9997    #[doc = "Airspeed, set to -1 if unknown"]
9998    pub airspeed: f32,
9999    #[doc = "Variance of body velocity estimate"]
10000    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10001    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10002    pub vel_variance: [f32; 3],
10003    #[doc = "Variance in local position"]
10004    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10005    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10006    pub pos_variance: [f32; 3],
10007    #[doc = "The attitude, represented as Quaternion"]
10008    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10009    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10010    pub q: [f32; 4],
10011    #[doc = "Angular rate in roll axis"]
10012    pub roll_rate: f32,
10013    #[doc = "Angular rate in pitch axis"]
10014    pub pitch_rate: f32,
10015    #[doc = "Angular rate in yaw axis"]
10016    pub yaw_rate: f32,
10017}
10018impl CONTROL_SYSTEM_STATE_DATA {
10019    pub const ENCODED_LEN: usize = 100usize;
10020    pub const DEFAULT: Self = Self {
10021        time_usec: 0_u64,
10022        x_acc: 0.0_f32,
10023        y_acc: 0.0_f32,
10024        z_acc: 0.0_f32,
10025        x_vel: 0.0_f32,
10026        y_vel: 0.0_f32,
10027        z_vel: 0.0_f32,
10028        x_pos: 0.0_f32,
10029        y_pos: 0.0_f32,
10030        z_pos: 0.0_f32,
10031        airspeed: 0.0_f32,
10032        vel_variance: [0.0_f32; 3usize],
10033        pos_variance: [0.0_f32; 3usize],
10034        q: [0.0_f32; 4usize],
10035        roll_rate: 0.0_f32,
10036        pitch_rate: 0.0_f32,
10037        yaw_rate: 0.0_f32,
10038    };
10039    #[cfg(feature = "arbitrary")]
10040    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10041        use arbitrary::{Arbitrary, Unstructured};
10042        let mut buf = [0u8; 1024];
10043        rng.fill_bytes(&mut buf);
10044        let mut unstructured = Unstructured::new(&buf);
10045        Self::arbitrary(&mut unstructured).unwrap_or_default()
10046    }
10047}
10048impl Default for CONTROL_SYSTEM_STATE_DATA {
10049    fn default() -> Self {
10050        Self::DEFAULT.clone()
10051    }
10052}
10053impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10054    type Message = MavMessage;
10055    const ID: u32 = 146u32;
10056    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10057    const EXTRA_CRC: u8 = 103u8;
10058    const ENCODED_LEN: usize = 100usize;
10059    fn deser(
10060        _version: MavlinkVersion,
10061        __input: &[u8],
10062    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10063        let avail_len = __input.len();
10064        let mut payload_buf = [0; Self::ENCODED_LEN];
10065        let mut buf = if avail_len < Self::ENCODED_LEN {
10066            payload_buf[0..avail_len].copy_from_slice(__input);
10067            Bytes::new(&payload_buf)
10068        } else {
10069            Bytes::new(__input)
10070        };
10071        let mut __struct = Self::default();
10072        __struct.time_usec = buf.get_u64_le();
10073        __struct.x_acc = buf.get_f32_le();
10074        __struct.y_acc = buf.get_f32_le();
10075        __struct.z_acc = buf.get_f32_le();
10076        __struct.x_vel = buf.get_f32_le();
10077        __struct.y_vel = buf.get_f32_le();
10078        __struct.z_vel = buf.get_f32_le();
10079        __struct.x_pos = buf.get_f32_le();
10080        __struct.y_pos = buf.get_f32_le();
10081        __struct.z_pos = buf.get_f32_le();
10082        __struct.airspeed = buf.get_f32_le();
10083        for v in &mut __struct.vel_variance {
10084            let val = buf.get_f32_le();
10085            *v = val;
10086        }
10087        for v in &mut __struct.pos_variance {
10088            let val = buf.get_f32_le();
10089            *v = val;
10090        }
10091        for v in &mut __struct.q {
10092            let val = buf.get_f32_le();
10093            *v = val;
10094        }
10095        __struct.roll_rate = buf.get_f32_le();
10096        __struct.pitch_rate = buf.get_f32_le();
10097        __struct.yaw_rate = buf.get_f32_le();
10098        Ok(__struct)
10099    }
10100    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10101        let mut __tmp = BytesMut::new(bytes);
10102        #[allow(clippy::absurd_extreme_comparisons)]
10103        #[allow(unused_comparisons)]
10104        if __tmp.remaining() < Self::ENCODED_LEN {
10105            panic!(
10106                "buffer is too small (need {} bytes, but got {})",
10107                Self::ENCODED_LEN,
10108                __tmp.remaining(),
10109            )
10110        }
10111        __tmp.put_u64_le(self.time_usec);
10112        __tmp.put_f32_le(self.x_acc);
10113        __tmp.put_f32_le(self.y_acc);
10114        __tmp.put_f32_le(self.z_acc);
10115        __tmp.put_f32_le(self.x_vel);
10116        __tmp.put_f32_le(self.y_vel);
10117        __tmp.put_f32_le(self.z_vel);
10118        __tmp.put_f32_le(self.x_pos);
10119        __tmp.put_f32_le(self.y_pos);
10120        __tmp.put_f32_le(self.z_pos);
10121        __tmp.put_f32_le(self.airspeed);
10122        for val in &self.vel_variance {
10123            __tmp.put_f32_le(*val);
10124        }
10125        for val in &self.pos_variance {
10126            __tmp.put_f32_le(*val);
10127        }
10128        for val in &self.q {
10129            __tmp.put_f32_le(*val);
10130        }
10131        __tmp.put_f32_le(self.roll_rate);
10132        __tmp.put_f32_le(self.pitch_rate);
10133        __tmp.put_f32_le(self.yaw_rate);
10134        if matches!(version, MavlinkVersion::V2) {
10135            let len = __tmp.len();
10136            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10137        } else {
10138            __tmp.len()
10139        }
10140    }
10141}
10142#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10143#[doc = ""]
10144#[doc = "ID: 411"]
10145#[derive(Debug, Clone, PartialEq)]
10146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10148#[cfg_attr(feature = "ts", derive(TS))]
10149#[cfg_attr(feature = "ts", ts(export))]
10150pub struct CURRENT_EVENT_SEQUENCE_DATA {
10151    #[doc = "Sequence number."]
10152    pub sequence: u16,
10153    #[doc = "Flag bitset."]
10154    pub flags: MavEventCurrentSequenceFlags,
10155}
10156impl CURRENT_EVENT_SEQUENCE_DATA {
10157    pub const ENCODED_LEN: usize = 3usize;
10158    pub const DEFAULT: Self = Self {
10159        sequence: 0_u16,
10160        flags: MavEventCurrentSequenceFlags::DEFAULT,
10161    };
10162    #[cfg(feature = "arbitrary")]
10163    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10164        use arbitrary::{Arbitrary, Unstructured};
10165        let mut buf = [0u8; 1024];
10166        rng.fill_bytes(&mut buf);
10167        let mut unstructured = Unstructured::new(&buf);
10168        Self::arbitrary(&mut unstructured).unwrap_or_default()
10169    }
10170}
10171impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10172    fn default() -> Self {
10173        Self::DEFAULT.clone()
10174    }
10175}
10176impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10177    type Message = MavMessage;
10178    const ID: u32 = 411u32;
10179    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10180    const EXTRA_CRC: u8 = 106u8;
10181    const ENCODED_LEN: usize = 3usize;
10182    fn deser(
10183        _version: MavlinkVersion,
10184        __input: &[u8],
10185    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10186        let avail_len = __input.len();
10187        let mut payload_buf = [0; Self::ENCODED_LEN];
10188        let mut buf = if avail_len < Self::ENCODED_LEN {
10189            payload_buf[0..avail_len].copy_from_slice(__input);
10190            Bytes::new(&payload_buf)
10191        } else {
10192            Bytes::new(__input)
10193        };
10194        let mut __struct = Self::default();
10195        __struct.sequence = buf.get_u16_le();
10196        let tmp = buf.get_u8();
10197        __struct.flags =
10198            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10199                enum_type: "MavEventCurrentSequenceFlags",
10200                value: tmp as u64,
10201            })?;
10202        Ok(__struct)
10203    }
10204    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10205        let mut __tmp = BytesMut::new(bytes);
10206        #[allow(clippy::absurd_extreme_comparisons)]
10207        #[allow(unused_comparisons)]
10208        if __tmp.remaining() < Self::ENCODED_LEN {
10209            panic!(
10210                "buffer is too small (need {} bytes, but got {})",
10211                Self::ENCODED_LEN,
10212                __tmp.remaining(),
10213            )
10214        }
10215        __tmp.put_u16_le(self.sequence);
10216        __tmp.put_u8(self.flags as u8);
10217        if matches!(version, MavlinkVersion::V2) {
10218            let len = __tmp.len();
10219            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10220        } else {
10221            __tmp.len()
10222        }
10223    }
10224}
10225#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10226#[doc = ""]
10227#[doc = "ID: 436"]
10228#[derive(Debug, Clone, PartialEq)]
10229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10231#[cfg_attr(feature = "ts", derive(TS))]
10232#[cfg_attr(feature = "ts", ts(export))]
10233pub struct CURRENT_MODE_DATA {
10234    #[doc = "A bitfield for use for autopilot-specific flags"]
10235    pub custom_mode: u32,
10236    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10237    pub intended_custom_mode: u32,
10238    #[doc = "Standard mode."]
10239    pub standard_mode: MavStandardMode,
10240}
10241impl CURRENT_MODE_DATA {
10242    pub const ENCODED_LEN: usize = 9usize;
10243    pub const DEFAULT: Self = Self {
10244        custom_mode: 0_u32,
10245        intended_custom_mode: 0_u32,
10246        standard_mode: MavStandardMode::DEFAULT,
10247    };
10248    #[cfg(feature = "arbitrary")]
10249    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10250        use arbitrary::{Arbitrary, Unstructured};
10251        let mut buf = [0u8; 1024];
10252        rng.fill_bytes(&mut buf);
10253        let mut unstructured = Unstructured::new(&buf);
10254        Self::arbitrary(&mut unstructured).unwrap_or_default()
10255    }
10256}
10257impl Default for CURRENT_MODE_DATA {
10258    fn default() -> Self {
10259        Self::DEFAULT.clone()
10260    }
10261}
10262impl MessageData for CURRENT_MODE_DATA {
10263    type Message = MavMessage;
10264    const ID: u32 = 436u32;
10265    const NAME: &'static str = "CURRENT_MODE";
10266    const EXTRA_CRC: u8 = 193u8;
10267    const ENCODED_LEN: usize = 9usize;
10268    fn deser(
10269        _version: MavlinkVersion,
10270        __input: &[u8],
10271    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10272        let avail_len = __input.len();
10273        let mut payload_buf = [0; Self::ENCODED_LEN];
10274        let mut buf = if avail_len < Self::ENCODED_LEN {
10275            payload_buf[0..avail_len].copy_from_slice(__input);
10276            Bytes::new(&payload_buf)
10277        } else {
10278            Bytes::new(__input)
10279        };
10280        let mut __struct = Self::default();
10281        __struct.custom_mode = buf.get_u32_le();
10282        __struct.intended_custom_mode = buf.get_u32_le();
10283        let tmp = buf.get_u8();
10284        __struct.standard_mode =
10285            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10286                enum_type: "MavStandardMode",
10287                value: tmp as u64,
10288            })?;
10289        Ok(__struct)
10290    }
10291    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10292        let mut __tmp = BytesMut::new(bytes);
10293        #[allow(clippy::absurd_extreme_comparisons)]
10294        #[allow(unused_comparisons)]
10295        if __tmp.remaining() < Self::ENCODED_LEN {
10296            panic!(
10297                "buffer is too small (need {} bytes, but got {})",
10298                Self::ENCODED_LEN,
10299                __tmp.remaining(),
10300            )
10301        }
10302        __tmp.put_u32_le(self.custom_mode);
10303        __tmp.put_u32_le(self.intended_custom_mode);
10304        __tmp.put_u8(self.standard_mode as u8);
10305        if matches!(version, MavlinkVersion::V2) {
10306            let len = __tmp.len();
10307            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10308        } else {
10309            __tmp.len()
10310        }
10311    }
10312}
10313#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10314#[doc = "Data stream status information."]
10315#[doc = ""]
10316#[doc = "ID: 67"]
10317#[derive(Debug, Clone, PartialEq)]
10318#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10319#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10320#[cfg_attr(feature = "ts", derive(TS))]
10321#[cfg_attr(feature = "ts", ts(export))]
10322pub struct DATA_STREAM_DATA {
10323    #[doc = "The message rate"]
10324    pub message_rate: u16,
10325    #[doc = "The ID of the requested data stream"]
10326    pub stream_id: u8,
10327    #[doc = "1 stream is enabled, 0 stream is stopped."]
10328    pub on_off: u8,
10329}
10330impl DATA_STREAM_DATA {
10331    pub const ENCODED_LEN: usize = 4usize;
10332    pub const DEFAULT: Self = Self {
10333        message_rate: 0_u16,
10334        stream_id: 0_u8,
10335        on_off: 0_u8,
10336    };
10337    #[cfg(feature = "arbitrary")]
10338    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10339        use arbitrary::{Arbitrary, Unstructured};
10340        let mut buf = [0u8; 1024];
10341        rng.fill_bytes(&mut buf);
10342        let mut unstructured = Unstructured::new(&buf);
10343        Self::arbitrary(&mut unstructured).unwrap_or_default()
10344    }
10345}
10346impl Default for DATA_STREAM_DATA {
10347    fn default() -> Self {
10348        Self::DEFAULT.clone()
10349    }
10350}
10351impl MessageData for DATA_STREAM_DATA {
10352    type Message = MavMessage;
10353    const ID: u32 = 67u32;
10354    const NAME: &'static str = "DATA_STREAM";
10355    const EXTRA_CRC: u8 = 21u8;
10356    const ENCODED_LEN: usize = 4usize;
10357    fn deser(
10358        _version: MavlinkVersion,
10359        __input: &[u8],
10360    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10361        let avail_len = __input.len();
10362        let mut payload_buf = [0; Self::ENCODED_LEN];
10363        let mut buf = if avail_len < Self::ENCODED_LEN {
10364            payload_buf[0..avail_len].copy_from_slice(__input);
10365            Bytes::new(&payload_buf)
10366        } else {
10367            Bytes::new(__input)
10368        };
10369        let mut __struct = Self::default();
10370        __struct.message_rate = buf.get_u16_le();
10371        __struct.stream_id = buf.get_u8();
10372        __struct.on_off = buf.get_u8();
10373        Ok(__struct)
10374    }
10375    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10376        let mut __tmp = BytesMut::new(bytes);
10377        #[allow(clippy::absurd_extreme_comparisons)]
10378        #[allow(unused_comparisons)]
10379        if __tmp.remaining() < Self::ENCODED_LEN {
10380            panic!(
10381                "buffer is too small (need {} bytes, but got {})",
10382                Self::ENCODED_LEN,
10383                __tmp.remaining(),
10384            )
10385        }
10386        __tmp.put_u16_le(self.message_rate);
10387        __tmp.put_u8(self.stream_id);
10388        __tmp.put_u8(self.on_off);
10389        if matches!(version, MavlinkVersion::V2) {
10390            let len = __tmp.len();
10391            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10392        } else {
10393            __tmp.len()
10394        }
10395    }
10396}
10397#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10398#[doc = ""]
10399#[doc = "ID: 130"]
10400#[derive(Debug, Clone, PartialEq)]
10401#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10402#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10403#[cfg_attr(feature = "ts", derive(TS))]
10404#[cfg_attr(feature = "ts", ts(export))]
10405pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10406    #[doc = "total data size (set on ACK only)."]
10407    pub size: u32,
10408    #[doc = "Width of a matrix or image."]
10409    pub width: u16,
10410    #[doc = "Height of a matrix or image."]
10411    pub height: u16,
10412    #[doc = "Number of packets being sent (set on ACK only)."]
10413    pub packets: u16,
10414    #[doc = "Type of requested/acknowledged data."]
10415    pub mavtype: MavlinkDataStreamType,
10416    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10417    pub payload: u8,
10418    #[doc = "JPEG quality. Values: [1-100]."]
10419    pub jpg_quality: u8,
10420}
10421impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10422    pub const ENCODED_LEN: usize = 13usize;
10423    pub const DEFAULT: Self = Self {
10424        size: 0_u32,
10425        width: 0_u16,
10426        height: 0_u16,
10427        packets: 0_u16,
10428        mavtype: MavlinkDataStreamType::DEFAULT,
10429        payload: 0_u8,
10430        jpg_quality: 0_u8,
10431    };
10432    #[cfg(feature = "arbitrary")]
10433    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10434        use arbitrary::{Arbitrary, Unstructured};
10435        let mut buf = [0u8; 1024];
10436        rng.fill_bytes(&mut buf);
10437        let mut unstructured = Unstructured::new(&buf);
10438        Self::arbitrary(&mut unstructured).unwrap_or_default()
10439    }
10440}
10441impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10442    fn default() -> Self {
10443        Self::DEFAULT.clone()
10444    }
10445}
10446impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10447    type Message = MavMessage;
10448    const ID: u32 = 130u32;
10449    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10450    const EXTRA_CRC: u8 = 29u8;
10451    const ENCODED_LEN: usize = 13usize;
10452    fn deser(
10453        _version: MavlinkVersion,
10454        __input: &[u8],
10455    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10456        let avail_len = __input.len();
10457        let mut payload_buf = [0; Self::ENCODED_LEN];
10458        let mut buf = if avail_len < Self::ENCODED_LEN {
10459            payload_buf[0..avail_len].copy_from_slice(__input);
10460            Bytes::new(&payload_buf)
10461        } else {
10462            Bytes::new(__input)
10463        };
10464        let mut __struct = Self::default();
10465        __struct.size = buf.get_u32_le();
10466        __struct.width = buf.get_u16_le();
10467        __struct.height = buf.get_u16_le();
10468        __struct.packets = buf.get_u16_le();
10469        let tmp = buf.get_u8();
10470        __struct.mavtype =
10471            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10472                enum_type: "MavlinkDataStreamType",
10473                value: tmp as u64,
10474            })?;
10475        __struct.payload = buf.get_u8();
10476        __struct.jpg_quality = buf.get_u8();
10477        Ok(__struct)
10478    }
10479    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10480        let mut __tmp = BytesMut::new(bytes);
10481        #[allow(clippy::absurd_extreme_comparisons)]
10482        #[allow(unused_comparisons)]
10483        if __tmp.remaining() < Self::ENCODED_LEN {
10484            panic!(
10485                "buffer is too small (need {} bytes, but got {})",
10486                Self::ENCODED_LEN,
10487                __tmp.remaining(),
10488            )
10489        }
10490        __tmp.put_u32_le(self.size);
10491        __tmp.put_u16_le(self.width);
10492        __tmp.put_u16_le(self.height);
10493        __tmp.put_u16_le(self.packets);
10494        __tmp.put_u8(self.mavtype as u8);
10495        __tmp.put_u8(self.payload);
10496        __tmp.put_u8(self.jpg_quality);
10497        if matches!(version, MavlinkVersion::V2) {
10498            let len = __tmp.len();
10499            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10500        } else {
10501            __tmp.len()
10502        }
10503    }
10504}
10505#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10506#[doc = ""]
10507#[doc = "ID: 254"]
10508#[derive(Debug, Clone, PartialEq)]
10509#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10510#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10511#[cfg_attr(feature = "ts", derive(TS))]
10512#[cfg_attr(feature = "ts", ts(export))]
10513pub struct DEBUG_DATA {
10514    #[doc = "Timestamp (time since system boot)."]
10515    pub time_boot_ms: u32,
10516    #[doc = "DEBUG value"]
10517    pub value: f32,
10518    #[doc = "index of debug variable"]
10519    pub ind: u8,
10520}
10521impl DEBUG_DATA {
10522    pub const ENCODED_LEN: usize = 9usize;
10523    pub const DEFAULT: Self = Self {
10524        time_boot_ms: 0_u32,
10525        value: 0.0_f32,
10526        ind: 0_u8,
10527    };
10528    #[cfg(feature = "arbitrary")]
10529    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10530        use arbitrary::{Arbitrary, Unstructured};
10531        let mut buf = [0u8; 1024];
10532        rng.fill_bytes(&mut buf);
10533        let mut unstructured = Unstructured::new(&buf);
10534        Self::arbitrary(&mut unstructured).unwrap_or_default()
10535    }
10536}
10537impl Default for DEBUG_DATA {
10538    fn default() -> Self {
10539        Self::DEFAULT.clone()
10540    }
10541}
10542impl MessageData for DEBUG_DATA {
10543    type Message = MavMessage;
10544    const ID: u32 = 254u32;
10545    const NAME: &'static str = "DEBUG";
10546    const EXTRA_CRC: u8 = 46u8;
10547    const ENCODED_LEN: usize = 9usize;
10548    fn deser(
10549        _version: MavlinkVersion,
10550        __input: &[u8],
10551    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10552        let avail_len = __input.len();
10553        let mut payload_buf = [0; Self::ENCODED_LEN];
10554        let mut buf = if avail_len < Self::ENCODED_LEN {
10555            payload_buf[0..avail_len].copy_from_slice(__input);
10556            Bytes::new(&payload_buf)
10557        } else {
10558            Bytes::new(__input)
10559        };
10560        let mut __struct = Self::default();
10561        __struct.time_boot_ms = buf.get_u32_le();
10562        __struct.value = buf.get_f32_le();
10563        __struct.ind = buf.get_u8();
10564        Ok(__struct)
10565    }
10566    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10567        let mut __tmp = BytesMut::new(bytes);
10568        #[allow(clippy::absurd_extreme_comparisons)]
10569        #[allow(unused_comparisons)]
10570        if __tmp.remaining() < Self::ENCODED_LEN {
10571            panic!(
10572                "buffer is too small (need {} bytes, but got {})",
10573                Self::ENCODED_LEN,
10574                __tmp.remaining(),
10575            )
10576        }
10577        __tmp.put_u32_le(self.time_boot_ms);
10578        __tmp.put_f32_le(self.value);
10579        __tmp.put_u8(self.ind);
10580        if matches!(version, MavlinkVersion::V2) {
10581            let len = __tmp.len();
10582            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10583        } else {
10584            __tmp.len()
10585        }
10586    }
10587}
10588#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10589#[doc = ""]
10590#[doc = "ID: 350"]
10591#[derive(Debug, Clone, PartialEq)]
10592#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10593#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10594#[cfg_attr(feature = "ts", derive(TS))]
10595#[cfg_attr(feature = "ts", ts(export))]
10596pub struct DEBUG_FLOAT_ARRAY_DATA {
10597    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10598    pub time_usec: u64,
10599    #[doc = "Unique ID used to discriminate between arrays"]
10600    pub array_id: u16,
10601    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10602    #[cfg_attr(feature = "ts", ts(type = "string"))]
10603    pub name: CharArray<10>,
10604    #[doc = "data"]
10605    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10606    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10607    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10608    pub data: [f32; 58],
10609}
10610impl DEBUG_FLOAT_ARRAY_DATA {
10611    pub const ENCODED_LEN: usize = 252usize;
10612    pub const DEFAULT: Self = Self {
10613        time_usec: 0_u64,
10614        array_id: 0_u16,
10615        name: CharArray::new([0_u8; 10usize]),
10616        data: [0.0_f32; 58usize],
10617    };
10618    #[cfg(feature = "arbitrary")]
10619    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10620        use arbitrary::{Arbitrary, Unstructured};
10621        let mut buf = [0u8; 1024];
10622        rng.fill_bytes(&mut buf);
10623        let mut unstructured = Unstructured::new(&buf);
10624        Self::arbitrary(&mut unstructured).unwrap_or_default()
10625    }
10626}
10627impl Default for DEBUG_FLOAT_ARRAY_DATA {
10628    fn default() -> Self {
10629        Self::DEFAULT.clone()
10630    }
10631}
10632impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10633    type Message = MavMessage;
10634    const ID: u32 = 350u32;
10635    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10636    const EXTRA_CRC: u8 = 232u8;
10637    const ENCODED_LEN: usize = 252usize;
10638    fn deser(
10639        _version: MavlinkVersion,
10640        __input: &[u8],
10641    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10642        let avail_len = __input.len();
10643        let mut payload_buf = [0; Self::ENCODED_LEN];
10644        let mut buf = if avail_len < Self::ENCODED_LEN {
10645            payload_buf[0..avail_len].copy_from_slice(__input);
10646            Bytes::new(&payload_buf)
10647        } else {
10648            Bytes::new(__input)
10649        };
10650        let mut __struct = Self::default();
10651        __struct.time_usec = buf.get_u64_le();
10652        __struct.array_id = buf.get_u16_le();
10653        let mut tmp = [0_u8; 10usize];
10654        for v in &mut tmp {
10655            *v = buf.get_u8();
10656        }
10657        __struct.name = CharArray::new(tmp);
10658        for v in &mut __struct.data {
10659            let val = buf.get_f32_le();
10660            *v = val;
10661        }
10662        Ok(__struct)
10663    }
10664    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10665        let mut __tmp = BytesMut::new(bytes);
10666        #[allow(clippy::absurd_extreme_comparisons)]
10667        #[allow(unused_comparisons)]
10668        if __tmp.remaining() < Self::ENCODED_LEN {
10669            panic!(
10670                "buffer is too small (need {} bytes, but got {})",
10671                Self::ENCODED_LEN,
10672                __tmp.remaining(),
10673            )
10674        }
10675        __tmp.put_u64_le(self.time_usec);
10676        __tmp.put_u16_le(self.array_id);
10677        for val in &self.name {
10678            __tmp.put_u8(*val);
10679        }
10680        if matches!(version, MavlinkVersion::V2) {
10681            for val in &self.data {
10682                __tmp.put_f32_le(*val);
10683            }
10684            let len = __tmp.len();
10685            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10686        } else {
10687            __tmp.len()
10688        }
10689    }
10690}
10691#[doc = "To debug something using a named 3D vector."]
10692#[doc = ""]
10693#[doc = "ID: 250"]
10694#[derive(Debug, Clone, PartialEq)]
10695#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10696#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10697#[cfg_attr(feature = "ts", derive(TS))]
10698#[cfg_attr(feature = "ts", ts(export))]
10699pub struct DEBUG_VECT_DATA {
10700    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10701    pub time_usec: u64,
10702    #[doc = "x"]
10703    pub x: f32,
10704    #[doc = "y"]
10705    pub y: f32,
10706    #[doc = "z"]
10707    pub z: f32,
10708    #[doc = "Name"]
10709    #[cfg_attr(feature = "ts", ts(type = "string"))]
10710    pub name: CharArray<10>,
10711}
10712impl DEBUG_VECT_DATA {
10713    pub const ENCODED_LEN: usize = 30usize;
10714    pub const DEFAULT: Self = Self {
10715        time_usec: 0_u64,
10716        x: 0.0_f32,
10717        y: 0.0_f32,
10718        z: 0.0_f32,
10719        name: CharArray::new([0_u8; 10usize]),
10720    };
10721    #[cfg(feature = "arbitrary")]
10722    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10723        use arbitrary::{Arbitrary, Unstructured};
10724        let mut buf = [0u8; 1024];
10725        rng.fill_bytes(&mut buf);
10726        let mut unstructured = Unstructured::new(&buf);
10727        Self::arbitrary(&mut unstructured).unwrap_or_default()
10728    }
10729}
10730impl Default for DEBUG_VECT_DATA {
10731    fn default() -> Self {
10732        Self::DEFAULT.clone()
10733    }
10734}
10735impl MessageData for DEBUG_VECT_DATA {
10736    type Message = MavMessage;
10737    const ID: u32 = 250u32;
10738    const NAME: &'static str = "DEBUG_VECT";
10739    const EXTRA_CRC: u8 = 49u8;
10740    const ENCODED_LEN: usize = 30usize;
10741    fn deser(
10742        _version: MavlinkVersion,
10743        __input: &[u8],
10744    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10745        let avail_len = __input.len();
10746        let mut payload_buf = [0; Self::ENCODED_LEN];
10747        let mut buf = if avail_len < Self::ENCODED_LEN {
10748            payload_buf[0..avail_len].copy_from_slice(__input);
10749            Bytes::new(&payload_buf)
10750        } else {
10751            Bytes::new(__input)
10752        };
10753        let mut __struct = Self::default();
10754        __struct.time_usec = buf.get_u64_le();
10755        __struct.x = buf.get_f32_le();
10756        __struct.y = buf.get_f32_le();
10757        __struct.z = buf.get_f32_le();
10758        let mut tmp = [0_u8; 10usize];
10759        for v in &mut tmp {
10760            *v = buf.get_u8();
10761        }
10762        __struct.name = CharArray::new(tmp);
10763        Ok(__struct)
10764    }
10765    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10766        let mut __tmp = BytesMut::new(bytes);
10767        #[allow(clippy::absurd_extreme_comparisons)]
10768        #[allow(unused_comparisons)]
10769        if __tmp.remaining() < Self::ENCODED_LEN {
10770            panic!(
10771                "buffer is too small (need {} bytes, but got {})",
10772                Self::ENCODED_LEN,
10773                __tmp.remaining(),
10774            )
10775        }
10776        __tmp.put_u64_le(self.time_usec);
10777        __tmp.put_f32_le(self.x);
10778        __tmp.put_f32_le(self.y);
10779        __tmp.put_f32_le(self.z);
10780        for val in &self.name {
10781            __tmp.put_u8(*val);
10782        }
10783        if matches!(version, MavlinkVersion::V2) {
10784            let len = __tmp.len();
10785            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10786        } else {
10787            __tmp.len()
10788        }
10789    }
10790}
10791#[doc = "Distance sensor information for an onboard rangefinder."]
10792#[doc = ""]
10793#[doc = "ID: 132"]
10794#[derive(Debug, Clone, PartialEq)]
10795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10796#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10797#[cfg_attr(feature = "ts", derive(TS))]
10798#[cfg_attr(feature = "ts", ts(export))]
10799pub struct DISTANCE_SENSOR_DATA {
10800    #[doc = "Timestamp (time since system boot)."]
10801    pub time_boot_ms: u32,
10802    #[doc = "Minimum distance the sensor can measure"]
10803    pub min_distance: u16,
10804    #[doc = "Maximum distance the sensor can measure"]
10805    pub max_distance: u16,
10806    #[doc = "Current distance reading"]
10807    pub current_distance: u16,
10808    #[doc = "Type of distance sensor."]
10809    pub mavtype: MavDistanceSensor,
10810    #[doc = "Onboard ID of the sensor"]
10811    pub id: u8,
10812    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10813    pub orientation: MavSensorOrientation,
10814    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10815    pub covariance: u8,
10816    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10817    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10818    pub horizontal_fov: f32,
10819    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10820    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10821    pub vertical_fov: f32,
10822    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10823    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10824    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10825    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10826    pub quaternion: [f32; 4],
10827    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10828    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10829    pub signal_quality: u8,
10830}
10831impl DISTANCE_SENSOR_DATA {
10832    pub const ENCODED_LEN: usize = 39usize;
10833    pub const DEFAULT: Self = Self {
10834        time_boot_ms: 0_u32,
10835        min_distance: 0_u16,
10836        max_distance: 0_u16,
10837        current_distance: 0_u16,
10838        mavtype: MavDistanceSensor::DEFAULT,
10839        id: 0_u8,
10840        orientation: MavSensorOrientation::DEFAULT,
10841        covariance: 0_u8,
10842        horizontal_fov: 0.0_f32,
10843        vertical_fov: 0.0_f32,
10844        quaternion: [0.0_f32; 4usize],
10845        signal_quality: 0_u8,
10846    };
10847    #[cfg(feature = "arbitrary")]
10848    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10849        use arbitrary::{Arbitrary, Unstructured};
10850        let mut buf = [0u8; 1024];
10851        rng.fill_bytes(&mut buf);
10852        let mut unstructured = Unstructured::new(&buf);
10853        Self::arbitrary(&mut unstructured).unwrap_or_default()
10854    }
10855}
10856impl Default for DISTANCE_SENSOR_DATA {
10857    fn default() -> Self {
10858        Self::DEFAULT.clone()
10859    }
10860}
10861impl MessageData for DISTANCE_SENSOR_DATA {
10862    type Message = MavMessage;
10863    const ID: u32 = 132u32;
10864    const NAME: &'static str = "DISTANCE_SENSOR";
10865    const EXTRA_CRC: u8 = 85u8;
10866    const ENCODED_LEN: usize = 39usize;
10867    fn deser(
10868        _version: MavlinkVersion,
10869        __input: &[u8],
10870    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10871        let avail_len = __input.len();
10872        let mut payload_buf = [0; Self::ENCODED_LEN];
10873        let mut buf = if avail_len < Self::ENCODED_LEN {
10874            payload_buf[0..avail_len].copy_from_slice(__input);
10875            Bytes::new(&payload_buf)
10876        } else {
10877            Bytes::new(__input)
10878        };
10879        let mut __struct = Self::default();
10880        __struct.time_boot_ms = buf.get_u32_le();
10881        __struct.min_distance = buf.get_u16_le();
10882        __struct.max_distance = buf.get_u16_le();
10883        __struct.current_distance = buf.get_u16_le();
10884        let tmp = buf.get_u8();
10885        __struct.mavtype =
10886            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10887                enum_type: "MavDistanceSensor",
10888                value: tmp as u64,
10889            })?;
10890        __struct.id = buf.get_u8();
10891        let tmp = buf.get_u8();
10892        __struct.orientation =
10893            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10894                enum_type: "MavSensorOrientation",
10895                value: tmp as u64,
10896            })?;
10897        __struct.covariance = buf.get_u8();
10898        __struct.horizontal_fov = buf.get_f32_le();
10899        __struct.vertical_fov = buf.get_f32_le();
10900        for v in &mut __struct.quaternion {
10901            let val = buf.get_f32_le();
10902            *v = val;
10903        }
10904        __struct.signal_quality = buf.get_u8();
10905        Ok(__struct)
10906    }
10907    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10908        let mut __tmp = BytesMut::new(bytes);
10909        #[allow(clippy::absurd_extreme_comparisons)]
10910        #[allow(unused_comparisons)]
10911        if __tmp.remaining() < Self::ENCODED_LEN {
10912            panic!(
10913                "buffer is too small (need {} bytes, but got {})",
10914                Self::ENCODED_LEN,
10915                __tmp.remaining(),
10916            )
10917        }
10918        __tmp.put_u32_le(self.time_boot_ms);
10919        __tmp.put_u16_le(self.min_distance);
10920        __tmp.put_u16_le(self.max_distance);
10921        __tmp.put_u16_le(self.current_distance);
10922        __tmp.put_u8(self.mavtype as u8);
10923        __tmp.put_u8(self.id);
10924        __tmp.put_u8(self.orientation as u8);
10925        __tmp.put_u8(self.covariance);
10926        if matches!(version, MavlinkVersion::V2) {
10927            __tmp.put_f32_le(self.horizontal_fov);
10928            __tmp.put_f32_le(self.vertical_fov);
10929            for val in &self.quaternion {
10930                __tmp.put_f32_le(*val);
10931            }
10932            __tmp.put_u8(self.signal_quality);
10933            let len = __tmp.len();
10934            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10935        } else {
10936            __tmp.len()
10937        }
10938    }
10939}
10940#[doc = "EFI status output."]
10941#[doc = ""]
10942#[doc = "ID: 225"]
10943#[derive(Debug, Clone, PartialEq)]
10944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10946#[cfg_attr(feature = "ts", derive(TS))]
10947#[cfg_attr(feature = "ts", ts(export))]
10948pub struct EFI_STATUS_DATA {
10949    #[doc = "ECU index"]
10950    pub ecu_index: f32,
10951    #[doc = "RPM"]
10952    pub rpm: f32,
10953    #[doc = "Fuel consumed"]
10954    pub fuel_consumed: f32,
10955    #[doc = "Fuel flow rate"]
10956    pub fuel_flow: f32,
10957    #[doc = "Engine load"]
10958    pub engine_load: f32,
10959    #[doc = "Throttle position"]
10960    pub throttle_position: f32,
10961    #[doc = "Spark dwell time"]
10962    pub spark_dwell_time: f32,
10963    #[doc = "Barometric pressure"]
10964    pub barometric_pressure: f32,
10965    #[doc = "Intake manifold pressure("]
10966    pub intake_manifold_pressure: f32,
10967    #[doc = "Intake manifold temperature"]
10968    pub intake_manifold_temperature: f32,
10969    #[doc = "Cylinder head temperature"]
10970    pub cylinder_head_temperature: f32,
10971    #[doc = "Ignition timing (Crank angle degrees)"]
10972    pub ignition_timing: f32,
10973    #[doc = "Injection time"]
10974    pub injection_time: f32,
10975    #[doc = "Exhaust gas temperature"]
10976    pub exhaust_gas_temperature: f32,
10977    #[doc = "Output throttle"]
10978    pub throttle_out: f32,
10979    #[doc = "Pressure/temperature compensation"]
10980    pub pt_compensation: f32,
10981    #[doc = "EFI health status"]
10982    pub health: u8,
10983    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10984    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10985    pub ignition_voltage: f32,
10986    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10987    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10988    pub fuel_pressure: f32,
10989}
10990impl EFI_STATUS_DATA {
10991    pub const ENCODED_LEN: usize = 73usize;
10992    pub const DEFAULT: Self = Self {
10993        ecu_index: 0.0_f32,
10994        rpm: 0.0_f32,
10995        fuel_consumed: 0.0_f32,
10996        fuel_flow: 0.0_f32,
10997        engine_load: 0.0_f32,
10998        throttle_position: 0.0_f32,
10999        spark_dwell_time: 0.0_f32,
11000        barometric_pressure: 0.0_f32,
11001        intake_manifold_pressure: 0.0_f32,
11002        intake_manifold_temperature: 0.0_f32,
11003        cylinder_head_temperature: 0.0_f32,
11004        ignition_timing: 0.0_f32,
11005        injection_time: 0.0_f32,
11006        exhaust_gas_temperature: 0.0_f32,
11007        throttle_out: 0.0_f32,
11008        pt_compensation: 0.0_f32,
11009        health: 0_u8,
11010        ignition_voltage: 0.0_f32,
11011        fuel_pressure: 0.0_f32,
11012    };
11013    #[cfg(feature = "arbitrary")]
11014    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11015        use arbitrary::{Arbitrary, Unstructured};
11016        let mut buf = [0u8; 1024];
11017        rng.fill_bytes(&mut buf);
11018        let mut unstructured = Unstructured::new(&buf);
11019        Self::arbitrary(&mut unstructured).unwrap_or_default()
11020    }
11021}
11022impl Default for EFI_STATUS_DATA {
11023    fn default() -> Self {
11024        Self::DEFAULT.clone()
11025    }
11026}
11027impl MessageData for EFI_STATUS_DATA {
11028    type Message = MavMessage;
11029    const ID: u32 = 225u32;
11030    const NAME: &'static str = "EFI_STATUS";
11031    const EXTRA_CRC: u8 = 208u8;
11032    const ENCODED_LEN: usize = 73usize;
11033    fn deser(
11034        _version: MavlinkVersion,
11035        __input: &[u8],
11036    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11037        let avail_len = __input.len();
11038        let mut payload_buf = [0; Self::ENCODED_LEN];
11039        let mut buf = if avail_len < Self::ENCODED_LEN {
11040            payload_buf[0..avail_len].copy_from_slice(__input);
11041            Bytes::new(&payload_buf)
11042        } else {
11043            Bytes::new(__input)
11044        };
11045        let mut __struct = Self::default();
11046        __struct.ecu_index = buf.get_f32_le();
11047        __struct.rpm = buf.get_f32_le();
11048        __struct.fuel_consumed = buf.get_f32_le();
11049        __struct.fuel_flow = buf.get_f32_le();
11050        __struct.engine_load = buf.get_f32_le();
11051        __struct.throttle_position = buf.get_f32_le();
11052        __struct.spark_dwell_time = buf.get_f32_le();
11053        __struct.barometric_pressure = buf.get_f32_le();
11054        __struct.intake_manifold_pressure = buf.get_f32_le();
11055        __struct.intake_manifold_temperature = buf.get_f32_le();
11056        __struct.cylinder_head_temperature = buf.get_f32_le();
11057        __struct.ignition_timing = buf.get_f32_le();
11058        __struct.injection_time = buf.get_f32_le();
11059        __struct.exhaust_gas_temperature = buf.get_f32_le();
11060        __struct.throttle_out = buf.get_f32_le();
11061        __struct.pt_compensation = buf.get_f32_le();
11062        __struct.health = buf.get_u8();
11063        __struct.ignition_voltage = buf.get_f32_le();
11064        __struct.fuel_pressure = buf.get_f32_le();
11065        Ok(__struct)
11066    }
11067    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11068        let mut __tmp = BytesMut::new(bytes);
11069        #[allow(clippy::absurd_extreme_comparisons)]
11070        #[allow(unused_comparisons)]
11071        if __tmp.remaining() < Self::ENCODED_LEN {
11072            panic!(
11073                "buffer is too small (need {} bytes, but got {})",
11074                Self::ENCODED_LEN,
11075                __tmp.remaining(),
11076            )
11077        }
11078        __tmp.put_f32_le(self.ecu_index);
11079        __tmp.put_f32_le(self.rpm);
11080        __tmp.put_f32_le(self.fuel_consumed);
11081        __tmp.put_f32_le(self.fuel_flow);
11082        __tmp.put_f32_le(self.engine_load);
11083        __tmp.put_f32_le(self.throttle_position);
11084        __tmp.put_f32_le(self.spark_dwell_time);
11085        __tmp.put_f32_le(self.barometric_pressure);
11086        __tmp.put_f32_le(self.intake_manifold_pressure);
11087        __tmp.put_f32_le(self.intake_manifold_temperature);
11088        __tmp.put_f32_le(self.cylinder_head_temperature);
11089        __tmp.put_f32_le(self.ignition_timing);
11090        __tmp.put_f32_le(self.injection_time);
11091        __tmp.put_f32_le(self.exhaust_gas_temperature);
11092        __tmp.put_f32_le(self.throttle_out);
11093        __tmp.put_f32_le(self.pt_compensation);
11094        __tmp.put_u8(self.health);
11095        if matches!(version, MavlinkVersion::V2) {
11096            __tmp.put_f32_le(self.ignition_voltage);
11097            __tmp.put_f32_le(self.fuel_pressure);
11098            let len = __tmp.len();
11099            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11100        } else {
11101            __tmp.len()
11102        }
11103    }
11104}
11105#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11106#[doc = ""]
11107#[doc = "ID: 131"]
11108#[derive(Debug, Clone, PartialEq)]
11109#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11111#[cfg_attr(feature = "ts", derive(TS))]
11112#[cfg_attr(feature = "ts", ts(export))]
11113pub struct ENCAPSULATED_DATA_DATA {
11114    #[doc = "sequence number (starting with 0 on every transmission)"]
11115    pub seqnr: u16,
11116    #[doc = "image data bytes"]
11117    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11118    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11119    pub data: [u8; 253],
11120}
11121impl ENCAPSULATED_DATA_DATA {
11122    pub const ENCODED_LEN: usize = 255usize;
11123    pub const DEFAULT: Self = Self {
11124        seqnr: 0_u16,
11125        data: [0_u8; 253usize],
11126    };
11127    #[cfg(feature = "arbitrary")]
11128    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11129        use arbitrary::{Arbitrary, Unstructured};
11130        let mut buf = [0u8; 1024];
11131        rng.fill_bytes(&mut buf);
11132        let mut unstructured = Unstructured::new(&buf);
11133        Self::arbitrary(&mut unstructured).unwrap_or_default()
11134    }
11135}
11136impl Default for ENCAPSULATED_DATA_DATA {
11137    fn default() -> Self {
11138        Self::DEFAULT.clone()
11139    }
11140}
11141impl MessageData for ENCAPSULATED_DATA_DATA {
11142    type Message = MavMessage;
11143    const ID: u32 = 131u32;
11144    const NAME: &'static str = "ENCAPSULATED_DATA";
11145    const EXTRA_CRC: u8 = 223u8;
11146    const ENCODED_LEN: usize = 255usize;
11147    fn deser(
11148        _version: MavlinkVersion,
11149        __input: &[u8],
11150    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11151        let avail_len = __input.len();
11152        let mut payload_buf = [0; Self::ENCODED_LEN];
11153        let mut buf = if avail_len < Self::ENCODED_LEN {
11154            payload_buf[0..avail_len].copy_from_slice(__input);
11155            Bytes::new(&payload_buf)
11156        } else {
11157            Bytes::new(__input)
11158        };
11159        let mut __struct = Self::default();
11160        __struct.seqnr = buf.get_u16_le();
11161        for v in &mut __struct.data {
11162            let val = buf.get_u8();
11163            *v = val;
11164        }
11165        Ok(__struct)
11166    }
11167    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11168        let mut __tmp = BytesMut::new(bytes);
11169        #[allow(clippy::absurd_extreme_comparisons)]
11170        #[allow(unused_comparisons)]
11171        if __tmp.remaining() < Self::ENCODED_LEN {
11172            panic!(
11173                "buffer is too small (need {} bytes, but got {})",
11174                Self::ENCODED_LEN,
11175                __tmp.remaining(),
11176            )
11177        }
11178        __tmp.put_u16_le(self.seqnr);
11179        for val in &self.data {
11180            __tmp.put_u8(*val);
11181        }
11182        if matches!(version, MavlinkVersion::V2) {
11183            let len = __tmp.len();
11184            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11185        } else {
11186            __tmp.len()
11187        }
11188    }
11189}
11190#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11191#[doc = ""]
11192#[doc = "ID: 290"]
11193#[derive(Debug, Clone, PartialEq)]
11194#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11196#[cfg_attr(feature = "ts", derive(TS))]
11197#[cfg_attr(feature = "ts", ts(export))]
11198pub struct ESC_INFO_DATA {
11199    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11200    pub time_usec: u64,
11201    #[doc = "Number of reported errors by each ESC since boot."]
11202    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11203    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11204    pub error_count: [u32; 4],
11205    #[doc = "Counter of data packets received."]
11206    pub counter: u16,
11207    #[doc = "Bitmap of ESC failure flags."]
11208    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11209    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11210    pub failure_flags: [u16; 4],
11211    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11212    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11213    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11214    pub temperature: [i16; 4],
11215    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11216    pub index: u8,
11217    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11218    pub count: u8,
11219    #[doc = "Connection type protocol for all ESC."]
11220    pub connection_type: EscConnectionType,
11221    #[doc = "Information regarding online/offline status of each ESC."]
11222    pub info: u8,
11223}
11224impl ESC_INFO_DATA {
11225    pub const ENCODED_LEN: usize = 46usize;
11226    pub const DEFAULT: Self = Self {
11227        time_usec: 0_u64,
11228        error_count: [0_u32; 4usize],
11229        counter: 0_u16,
11230        failure_flags: [0_u16; 4usize],
11231        temperature: [0_i16; 4usize],
11232        index: 0_u8,
11233        count: 0_u8,
11234        connection_type: EscConnectionType::DEFAULT,
11235        info: 0_u8,
11236    };
11237    #[cfg(feature = "arbitrary")]
11238    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11239        use arbitrary::{Arbitrary, Unstructured};
11240        let mut buf = [0u8; 1024];
11241        rng.fill_bytes(&mut buf);
11242        let mut unstructured = Unstructured::new(&buf);
11243        Self::arbitrary(&mut unstructured).unwrap_or_default()
11244    }
11245}
11246impl Default for ESC_INFO_DATA {
11247    fn default() -> Self {
11248        Self::DEFAULT.clone()
11249    }
11250}
11251impl MessageData for ESC_INFO_DATA {
11252    type Message = MavMessage;
11253    const ID: u32 = 290u32;
11254    const NAME: &'static str = "ESC_INFO";
11255    const EXTRA_CRC: u8 = 251u8;
11256    const ENCODED_LEN: usize = 46usize;
11257    fn deser(
11258        _version: MavlinkVersion,
11259        __input: &[u8],
11260    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11261        let avail_len = __input.len();
11262        let mut payload_buf = [0; Self::ENCODED_LEN];
11263        let mut buf = if avail_len < Self::ENCODED_LEN {
11264            payload_buf[0..avail_len].copy_from_slice(__input);
11265            Bytes::new(&payload_buf)
11266        } else {
11267            Bytes::new(__input)
11268        };
11269        let mut __struct = Self::default();
11270        __struct.time_usec = buf.get_u64_le();
11271        for v in &mut __struct.error_count {
11272            let val = buf.get_u32_le();
11273            *v = val;
11274        }
11275        __struct.counter = buf.get_u16_le();
11276        for v in &mut __struct.failure_flags {
11277            let val = buf.get_u16_le();
11278            *v = val;
11279        }
11280        for v in &mut __struct.temperature {
11281            let val = buf.get_i16_le();
11282            *v = val;
11283        }
11284        __struct.index = buf.get_u8();
11285        __struct.count = buf.get_u8();
11286        let tmp = buf.get_u8();
11287        __struct.connection_type =
11288            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11289                enum_type: "EscConnectionType",
11290                value: tmp as u64,
11291            })?;
11292        __struct.info = buf.get_u8();
11293        Ok(__struct)
11294    }
11295    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11296        let mut __tmp = BytesMut::new(bytes);
11297        #[allow(clippy::absurd_extreme_comparisons)]
11298        #[allow(unused_comparisons)]
11299        if __tmp.remaining() < Self::ENCODED_LEN {
11300            panic!(
11301                "buffer is too small (need {} bytes, but got {})",
11302                Self::ENCODED_LEN,
11303                __tmp.remaining(),
11304            )
11305        }
11306        __tmp.put_u64_le(self.time_usec);
11307        for val in &self.error_count {
11308            __tmp.put_u32_le(*val);
11309        }
11310        __tmp.put_u16_le(self.counter);
11311        for val in &self.failure_flags {
11312            __tmp.put_u16_le(*val);
11313        }
11314        for val in &self.temperature {
11315            __tmp.put_i16_le(*val);
11316        }
11317        __tmp.put_u8(self.index);
11318        __tmp.put_u8(self.count);
11319        __tmp.put_u8(self.connection_type as u8);
11320        __tmp.put_u8(self.info);
11321        if matches!(version, MavlinkVersion::V2) {
11322            let len = __tmp.len();
11323            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11324        } else {
11325            __tmp.len()
11326        }
11327    }
11328}
11329#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11330#[doc = ""]
11331#[doc = "ID: 291"]
11332#[derive(Debug, Clone, PartialEq)]
11333#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11334#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11335#[cfg_attr(feature = "ts", derive(TS))]
11336#[cfg_attr(feature = "ts", ts(export))]
11337pub struct ESC_STATUS_DATA {
11338    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11339    pub time_usec: u64,
11340    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11341    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11342    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11343    pub rpm: [i32; 4],
11344    #[doc = "Voltage measured from each ESC."]
11345    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11346    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11347    pub voltage: [f32; 4],
11348    #[doc = "Current measured from each ESC."]
11349    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11350    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11351    pub current: [f32; 4],
11352    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11353    pub index: u8,
11354}
11355impl ESC_STATUS_DATA {
11356    pub const ENCODED_LEN: usize = 57usize;
11357    pub const DEFAULT: Self = Self {
11358        time_usec: 0_u64,
11359        rpm: [0_i32; 4usize],
11360        voltage: [0.0_f32; 4usize],
11361        current: [0.0_f32; 4usize],
11362        index: 0_u8,
11363    };
11364    #[cfg(feature = "arbitrary")]
11365    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11366        use arbitrary::{Arbitrary, Unstructured};
11367        let mut buf = [0u8; 1024];
11368        rng.fill_bytes(&mut buf);
11369        let mut unstructured = Unstructured::new(&buf);
11370        Self::arbitrary(&mut unstructured).unwrap_or_default()
11371    }
11372}
11373impl Default for ESC_STATUS_DATA {
11374    fn default() -> Self {
11375        Self::DEFAULT.clone()
11376    }
11377}
11378impl MessageData for ESC_STATUS_DATA {
11379    type Message = MavMessage;
11380    const ID: u32 = 291u32;
11381    const NAME: &'static str = "ESC_STATUS";
11382    const EXTRA_CRC: u8 = 10u8;
11383    const ENCODED_LEN: usize = 57usize;
11384    fn deser(
11385        _version: MavlinkVersion,
11386        __input: &[u8],
11387    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11388        let avail_len = __input.len();
11389        let mut payload_buf = [0; Self::ENCODED_LEN];
11390        let mut buf = if avail_len < Self::ENCODED_LEN {
11391            payload_buf[0..avail_len].copy_from_slice(__input);
11392            Bytes::new(&payload_buf)
11393        } else {
11394            Bytes::new(__input)
11395        };
11396        let mut __struct = Self::default();
11397        __struct.time_usec = buf.get_u64_le();
11398        for v in &mut __struct.rpm {
11399            let val = buf.get_i32_le();
11400            *v = val;
11401        }
11402        for v in &mut __struct.voltage {
11403            let val = buf.get_f32_le();
11404            *v = val;
11405        }
11406        for v in &mut __struct.current {
11407            let val = buf.get_f32_le();
11408            *v = val;
11409        }
11410        __struct.index = buf.get_u8();
11411        Ok(__struct)
11412    }
11413    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11414        let mut __tmp = BytesMut::new(bytes);
11415        #[allow(clippy::absurd_extreme_comparisons)]
11416        #[allow(unused_comparisons)]
11417        if __tmp.remaining() < Self::ENCODED_LEN {
11418            panic!(
11419                "buffer is too small (need {} bytes, but got {})",
11420                Self::ENCODED_LEN,
11421                __tmp.remaining(),
11422            )
11423        }
11424        __tmp.put_u64_le(self.time_usec);
11425        for val in &self.rpm {
11426            __tmp.put_i32_le(*val);
11427        }
11428        for val in &self.voltage {
11429            __tmp.put_f32_le(*val);
11430        }
11431        for val in &self.current {
11432            __tmp.put_f32_le(*val);
11433        }
11434        __tmp.put_u8(self.index);
11435        if matches!(version, MavlinkVersion::V2) {
11436            let len = __tmp.len();
11437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11438        } else {
11439            __tmp.len()
11440        }
11441    }
11442}
11443#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11444#[doc = ""]
11445#[doc = "ID: 230"]
11446#[derive(Debug, Clone, PartialEq)]
11447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11449#[cfg_attr(feature = "ts", derive(TS))]
11450#[cfg_attr(feature = "ts", ts(export))]
11451pub struct ESTIMATOR_STATUS_DATA {
11452    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11453    pub time_usec: u64,
11454    #[doc = "Velocity innovation test ratio"]
11455    pub vel_ratio: f32,
11456    #[doc = "Horizontal position innovation test ratio"]
11457    pub pos_horiz_ratio: f32,
11458    #[doc = "Vertical position innovation test ratio"]
11459    pub pos_vert_ratio: f32,
11460    #[doc = "Magnetometer innovation test ratio"]
11461    pub mag_ratio: f32,
11462    #[doc = "Height above terrain innovation test ratio"]
11463    pub hagl_ratio: f32,
11464    #[doc = "True airspeed innovation test ratio"]
11465    pub tas_ratio: f32,
11466    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11467    pub pos_horiz_accuracy: f32,
11468    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11469    pub pos_vert_accuracy: f32,
11470    #[doc = "Bitmap indicating which EKF outputs are valid."]
11471    pub flags: EstimatorStatusFlags,
11472}
11473impl ESTIMATOR_STATUS_DATA {
11474    pub const ENCODED_LEN: usize = 42usize;
11475    pub const DEFAULT: Self = Self {
11476        time_usec: 0_u64,
11477        vel_ratio: 0.0_f32,
11478        pos_horiz_ratio: 0.0_f32,
11479        pos_vert_ratio: 0.0_f32,
11480        mag_ratio: 0.0_f32,
11481        hagl_ratio: 0.0_f32,
11482        tas_ratio: 0.0_f32,
11483        pos_horiz_accuracy: 0.0_f32,
11484        pos_vert_accuracy: 0.0_f32,
11485        flags: EstimatorStatusFlags::DEFAULT,
11486    };
11487    #[cfg(feature = "arbitrary")]
11488    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11489        use arbitrary::{Arbitrary, Unstructured};
11490        let mut buf = [0u8; 1024];
11491        rng.fill_bytes(&mut buf);
11492        let mut unstructured = Unstructured::new(&buf);
11493        Self::arbitrary(&mut unstructured).unwrap_or_default()
11494    }
11495}
11496impl Default for ESTIMATOR_STATUS_DATA {
11497    fn default() -> Self {
11498        Self::DEFAULT.clone()
11499    }
11500}
11501impl MessageData for ESTIMATOR_STATUS_DATA {
11502    type Message = MavMessage;
11503    const ID: u32 = 230u32;
11504    const NAME: &'static str = "ESTIMATOR_STATUS";
11505    const EXTRA_CRC: u8 = 163u8;
11506    const ENCODED_LEN: usize = 42usize;
11507    fn deser(
11508        _version: MavlinkVersion,
11509        __input: &[u8],
11510    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11511        let avail_len = __input.len();
11512        let mut payload_buf = [0; Self::ENCODED_LEN];
11513        let mut buf = if avail_len < Self::ENCODED_LEN {
11514            payload_buf[0..avail_len].copy_from_slice(__input);
11515            Bytes::new(&payload_buf)
11516        } else {
11517            Bytes::new(__input)
11518        };
11519        let mut __struct = Self::default();
11520        __struct.time_usec = buf.get_u64_le();
11521        __struct.vel_ratio = buf.get_f32_le();
11522        __struct.pos_horiz_ratio = buf.get_f32_le();
11523        __struct.pos_vert_ratio = buf.get_f32_le();
11524        __struct.mag_ratio = buf.get_f32_le();
11525        __struct.hagl_ratio = buf.get_f32_le();
11526        __struct.tas_ratio = buf.get_f32_le();
11527        __struct.pos_horiz_accuracy = buf.get_f32_le();
11528        __struct.pos_vert_accuracy = buf.get_f32_le();
11529        let tmp = buf.get_u16_le();
11530        __struct.flags = EstimatorStatusFlags::from_bits(
11531            tmp as <EstimatorStatusFlags as Flags>::Bits,
11532        )
11533        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11534            flag_type: "EstimatorStatusFlags",
11535            value: tmp as u64,
11536        })?;
11537        Ok(__struct)
11538    }
11539    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11540        let mut __tmp = BytesMut::new(bytes);
11541        #[allow(clippy::absurd_extreme_comparisons)]
11542        #[allow(unused_comparisons)]
11543        if __tmp.remaining() < Self::ENCODED_LEN {
11544            panic!(
11545                "buffer is too small (need {} bytes, but got {})",
11546                Self::ENCODED_LEN,
11547                __tmp.remaining(),
11548            )
11549        }
11550        __tmp.put_u64_le(self.time_usec);
11551        __tmp.put_f32_le(self.vel_ratio);
11552        __tmp.put_f32_le(self.pos_horiz_ratio);
11553        __tmp.put_f32_le(self.pos_vert_ratio);
11554        __tmp.put_f32_le(self.mag_ratio);
11555        __tmp.put_f32_le(self.hagl_ratio);
11556        __tmp.put_f32_le(self.tas_ratio);
11557        __tmp.put_f32_le(self.pos_horiz_accuracy);
11558        __tmp.put_f32_le(self.pos_vert_accuracy);
11559        __tmp.put_u16_le(self.flags.bits() as u16);
11560        if matches!(version, MavlinkVersion::V2) {
11561            let len = __tmp.len();
11562            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11563        } else {
11564            __tmp.len()
11565        }
11566    }
11567}
11568#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11569#[doc = ""]
11570#[doc = "ID: 410"]
11571#[derive(Debug, Clone, PartialEq)]
11572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11573#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11574#[cfg_attr(feature = "ts", derive(TS))]
11575#[cfg_attr(feature = "ts", ts(export))]
11576pub struct EVENT_DATA {
11577    #[doc = "Event ID (as defined in the component metadata)"]
11578    pub id: u32,
11579    #[doc = "Timestamp (time since system boot when the event happened)."]
11580    pub event_time_boot_ms: u32,
11581    #[doc = "Sequence number."]
11582    pub sequence: u16,
11583    #[doc = "Component ID"]
11584    pub destination_component: u8,
11585    #[doc = "System ID"]
11586    pub destination_system: u8,
11587    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11588    pub log_levels: u8,
11589    #[doc = "Arguments (depend on event ID)."]
11590    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11591    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11592    pub arguments: [u8; 40],
11593}
11594impl EVENT_DATA {
11595    pub const ENCODED_LEN: usize = 53usize;
11596    pub const DEFAULT: Self = Self {
11597        id: 0_u32,
11598        event_time_boot_ms: 0_u32,
11599        sequence: 0_u16,
11600        destination_component: 0_u8,
11601        destination_system: 0_u8,
11602        log_levels: 0_u8,
11603        arguments: [0_u8; 40usize],
11604    };
11605    #[cfg(feature = "arbitrary")]
11606    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11607        use arbitrary::{Arbitrary, Unstructured};
11608        let mut buf = [0u8; 1024];
11609        rng.fill_bytes(&mut buf);
11610        let mut unstructured = Unstructured::new(&buf);
11611        Self::arbitrary(&mut unstructured).unwrap_or_default()
11612    }
11613}
11614impl Default for EVENT_DATA {
11615    fn default() -> Self {
11616        Self::DEFAULT.clone()
11617    }
11618}
11619impl MessageData for EVENT_DATA {
11620    type Message = MavMessage;
11621    const ID: u32 = 410u32;
11622    const NAME: &'static str = "EVENT";
11623    const EXTRA_CRC: u8 = 160u8;
11624    const ENCODED_LEN: usize = 53usize;
11625    fn deser(
11626        _version: MavlinkVersion,
11627        __input: &[u8],
11628    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11629        let avail_len = __input.len();
11630        let mut payload_buf = [0; Self::ENCODED_LEN];
11631        let mut buf = if avail_len < Self::ENCODED_LEN {
11632            payload_buf[0..avail_len].copy_from_slice(__input);
11633            Bytes::new(&payload_buf)
11634        } else {
11635            Bytes::new(__input)
11636        };
11637        let mut __struct = Self::default();
11638        __struct.id = buf.get_u32_le();
11639        __struct.event_time_boot_ms = buf.get_u32_le();
11640        __struct.sequence = buf.get_u16_le();
11641        __struct.destination_component = buf.get_u8();
11642        __struct.destination_system = buf.get_u8();
11643        __struct.log_levels = buf.get_u8();
11644        for v in &mut __struct.arguments {
11645            let val = buf.get_u8();
11646            *v = val;
11647        }
11648        Ok(__struct)
11649    }
11650    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11651        let mut __tmp = BytesMut::new(bytes);
11652        #[allow(clippy::absurd_extreme_comparisons)]
11653        #[allow(unused_comparisons)]
11654        if __tmp.remaining() < Self::ENCODED_LEN {
11655            panic!(
11656                "buffer is too small (need {} bytes, but got {})",
11657                Self::ENCODED_LEN,
11658                __tmp.remaining(),
11659            )
11660        }
11661        __tmp.put_u32_le(self.id);
11662        __tmp.put_u32_le(self.event_time_boot_ms);
11663        __tmp.put_u16_le(self.sequence);
11664        __tmp.put_u8(self.destination_component);
11665        __tmp.put_u8(self.destination_system);
11666        __tmp.put_u8(self.log_levels);
11667        for val in &self.arguments {
11668            __tmp.put_u8(*val);
11669        }
11670        if matches!(version, MavlinkVersion::V2) {
11671            let len = __tmp.len();
11672            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11673        } else {
11674            __tmp.len()
11675        }
11676    }
11677}
11678#[doc = "Provides state for additional features."]
11679#[doc = ""]
11680#[doc = "ID: 245"]
11681#[derive(Debug, Clone, PartialEq)]
11682#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11683#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11684#[cfg_attr(feature = "ts", derive(TS))]
11685#[cfg_attr(feature = "ts", ts(export))]
11686pub struct EXTENDED_SYS_STATE_DATA {
11687    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11688    pub vtol_state: MavVtolState,
11689    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11690    pub landed_state: MavLandedState,
11691}
11692impl EXTENDED_SYS_STATE_DATA {
11693    pub const ENCODED_LEN: usize = 2usize;
11694    pub const DEFAULT: Self = Self {
11695        vtol_state: MavVtolState::DEFAULT,
11696        landed_state: MavLandedState::DEFAULT,
11697    };
11698    #[cfg(feature = "arbitrary")]
11699    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11700        use arbitrary::{Arbitrary, Unstructured};
11701        let mut buf = [0u8; 1024];
11702        rng.fill_bytes(&mut buf);
11703        let mut unstructured = Unstructured::new(&buf);
11704        Self::arbitrary(&mut unstructured).unwrap_or_default()
11705    }
11706}
11707impl Default for EXTENDED_SYS_STATE_DATA {
11708    fn default() -> Self {
11709        Self::DEFAULT.clone()
11710    }
11711}
11712impl MessageData for EXTENDED_SYS_STATE_DATA {
11713    type Message = MavMessage;
11714    const ID: u32 = 245u32;
11715    const NAME: &'static str = "EXTENDED_SYS_STATE";
11716    const EXTRA_CRC: u8 = 130u8;
11717    const ENCODED_LEN: usize = 2usize;
11718    fn deser(
11719        _version: MavlinkVersion,
11720        __input: &[u8],
11721    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11722        let avail_len = __input.len();
11723        let mut payload_buf = [0; Self::ENCODED_LEN];
11724        let mut buf = if avail_len < Self::ENCODED_LEN {
11725            payload_buf[0..avail_len].copy_from_slice(__input);
11726            Bytes::new(&payload_buf)
11727        } else {
11728            Bytes::new(__input)
11729        };
11730        let mut __struct = Self::default();
11731        let tmp = buf.get_u8();
11732        __struct.vtol_state =
11733            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11734                enum_type: "MavVtolState",
11735                value: tmp as u64,
11736            })?;
11737        let tmp = buf.get_u8();
11738        __struct.landed_state =
11739            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11740                enum_type: "MavLandedState",
11741                value: tmp as u64,
11742            })?;
11743        Ok(__struct)
11744    }
11745    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11746        let mut __tmp = BytesMut::new(bytes);
11747        #[allow(clippy::absurd_extreme_comparisons)]
11748        #[allow(unused_comparisons)]
11749        if __tmp.remaining() < Self::ENCODED_LEN {
11750            panic!(
11751                "buffer is too small (need {} bytes, but got {})",
11752                Self::ENCODED_LEN,
11753                __tmp.remaining(),
11754            )
11755        }
11756        __tmp.put_u8(self.vtol_state as u8);
11757        __tmp.put_u8(self.landed_state as u8);
11758        if matches!(version, MavlinkVersion::V2) {
11759            let len = __tmp.len();
11760            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11761        } else {
11762            __tmp.len()
11763        }
11764    }
11765}
11766#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11767#[doc = ""]
11768#[doc = "ID: 162"]
11769#[derive(Debug, Clone, PartialEq)]
11770#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11771#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11772#[cfg_attr(feature = "ts", derive(TS))]
11773#[cfg_attr(feature = "ts", ts(export))]
11774pub struct FENCE_STATUS_DATA {
11775    #[doc = "Time (since boot) of last breach."]
11776    pub breach_time: u32,
11777    #[doc = "Number of fence breaches."]
11778    pub breach_count: u16,
11779    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11780    pub breach_status: u8,
11781    #[doc = "Last breach type."]
11782    pub breach_type: FenceBreach,
11783    #[doc = "Active action to prevent fence breach"]
11784    #[cfg_attr(feature = "serde", serde(default))]
11785    pub breach_mitigation: FenceMitigate,
11786}
11787impl FENCE_STATUS_DATA {
11788    pub const ENCODED_LEN: usize = 9usize;
11789    pub const DEFAULT: Self = Self {
11790        breach_time: 0_u32,
11791        breach_count: 0_u16,
11792        breach_status: 0_u8,
11793        breach_type: FenceBreach::DEFAULT,
11794        breach_mitigation: FenceMitigate::DEFAULT,
11795    };
11796    #[cfg(feature = "arbitrary")]
11797    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11798        use arbitrary::{Arbitrary, Unstructured};
11799        let mut buf = [0u8; 1024];
11800        rng.fill_bytes(&mut buf);
11801        let mut unstructured = Unstructured::new(&buf);
11802        Self::arbitrary(&mut unstructured).unwrap_or_default()
11803    }
11804}
11805impl Default for FENCE_STATUS_DATA {
11806    fn default() -> Self {
11807        Self::DEFAULT.clone()
11808    }
11809}
11810impl MessageData for FENCE_STATUS_DATA {
11811    type Message = MavMessage;
11812    const ID: u32 = 162u32;
11813    const NAME: &'static str = "FENCE_STATUS";
11814    const EXTRA_CRC: u8 = 189u8;
11815    const ENCODED_LEN: usize = 9usize;
11816    fn deser(
11817        _version: MavlinkVersion,
11818        __input: &[u8],
11819    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11820        let avail_len = __input.len();
11821        let mut payload_buf = [0; Self::ENCODED_LEN];
11822        let mut buf = if avail_len < Self::ENCODED_LEN {
11823            payload_buf[0..avail_len].copy_from_slice(__input);
11824            Bytes::new(&payload_buf)
11825        } else {
11826            Bytes::new(__input)
11827        };
11828        let mut __struct = Self::default();
11829        __struct.breach_time = buf.get_u32_le();
11830        __struct.breach_count = buf.get_u16_le();
11831        __struct.breach_status = buf.get_u8();
11832        let tmp = buf.get_u8();
11833        __struct.breach_type =
11834            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11835                enum_type: "FenceBreach",
11836                value: tmp as u64,
11837            })?;
11838        let tmp = buf.get_u8();
11839        __struct.breach_mitigation =
11840            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11841                enum_type: "FenceMitigate",
11842                value: tmp as u64,
11843            })?;
11844        Ok(__struct)
11845    }
11846    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11847        let mut __tmp = BytesMut::new(bytes);
11848        #[allow(clippy::absurd_extreme_comparisons)]
11849        #[allow(unused_comparisons)]
11850        if __tmp.remaining() < Self::ENCODED_LEN {
11851            panic!(
11852                "buffer is too small (need {} bytes, but got {})",
11853                Self::ENCODED_LEN,
11854                __tmp.remaining(),
11855            )
11856        }
11857        __tmp.put_u32_le(self.breach_time);
11858        __tmp.put_u16_le(self.breach_count);
11859        __tmp.put_u8(self.breach_status);
11860        __tmp.put_u8(self.breach_type as u8);
11861        if matches!(version, MavlinkVersion::V2) {
11862            __tmp.put_u8(self.breach_mitigation as u8);
11863            let len = __tmp.len();
11864            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11865        } else {
11866            __tmp.len()
11867        }
11868    }
11869}
11870#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11871#[doc = ""]
11872#[doc = "ID: 110"]
11873#[derive(Debug, Clone, PartialEq)]
11874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11876#[cfg_attr(feature = "ts", derive(TS))]
11877#[cfg_attr(feature = "ts", ts(export))]
11878pub struct FILE_TRANSFER_PROTOCOL_DATA {
11879    #[doc = "Network ID (0 for broadcast)"]
11880    pub target_network: u8,
11881    #[doc = "System ID (0 for broadcast)"]
11882    pub target_system: u8,
11883    #[doc = "Component ID (0 for broadcast)"]
11884    pub target_component: u8,
11885    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11886    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11887    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11888    pub payload: [u8; 251],
11889}
11890impl FILE_TRANSFER_PROTOCOL_DATA {
11891    pub const ENCODED_LEN: usize = 254usize;
11892    pub const DEFAULT: Self = Self {
11893        target_network: 0_u8,
11894        target_system: 0_u8,
11895        target_component: 0_u8,
11896        payload: [0_u8; 251usize],
11897    };
11898    #[cfg(feature = "arbitrary")]
11899    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11900        use arbitrary::{Arbitrary, Unstructured};
11901        let mut buf = [0u8; 1024];
11902        rng.fill_bytes(&mut buf);
11903        let mut unstructured = Unstructured::new(&buf);
11904        Self::arbitrary(&mut unstructured).unwrap_or_default()
11905    }
11906}
11907impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11908    fn default() -> Self {
11909        Self::DEFAULT.clone()
11910    }
11911}
11912impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11913    type Message = MavMessage;
11914    const ID: u32 = 110u32;
11915    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11916    const EXTRA_CRC: u8 = 84u8;
11917    const ENCODED_LEN: usize = 254usize;
11918    fn deser(
11919        _version: MavlinkVersion,
11920        __input: &[u8],
11921    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11922        let avail_len = __input.len();
11923        let mut payload_buf = [0; Self::ENCODED_LEN];
11924        let mut buf = if avail_len < Self::ENCODED_LEN {
11925            payload_buf[0..avail_len].copy_from_slice(__input);
11926            Bytes::new(&payload_buf)
11927        } else {
11928            Bytes::new(__input)
11929        };
11930        let mut __struct = Self::default();
11931        __struct.target_network = buf.get_u8();
11932        __struct.target_system = buf.get_u8();
11933        __struct.target_component = buf.get_u8();
11934        for v in &mut __struct.payload {
11935            let val = buf.get_u8();
11936            *v = val;
11937        }
11938        Ok(__struct)
11939    }
11940    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11941        let mut __tmp = BytesMut::new(bytes);
11942        #[allow(clippy::absurd_extreme_comparisons)]
11943        #[allow(unused_comparisons)]
11944        if __tmp.remaining() < Self::ENCODED_LEN {
11945            panic!(
11946                "buffer is too small (need {} bytes, but got {})",
11947                Self::ENCODED_LEN,
11948                __tmp.remaining(),
11949            )
11950        }
11951        __tmp.put_u8(self.target_network);
11952        __tmp.put_u8(self.target_system);
11953        __tmp.put_u8(self.target_component);
11954        for val in &self.payload {
11955            __tmp.put_u8(*val);
11956        }
11957        if matches!(version, MavlinkVersion::V2) {
11958            let len = __tmp.len();
11959            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11960        } else {
11961            __tmp.len()
11962        }
11963    }
11964}
11965#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11966#[doc = ""]
11967#[doc = "ID: 264"]
11968#[derive(Debug, Clone, PartialEq)]
11969#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11970#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11971#[cfg_attr(feature = "ts", derive(TS))]
11972#[cfg_attr(feature = "ts", ts(export))]
11973pub struct FLIGHT_INFORMATION_DATA {
11974    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11975    pub arming_time_utc: u64,
11976    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11977    pub takeoff_time_utc: u64,
11978    #[doc = "Flight number. Note, field is misnamed UUID."]
11979    pub flight_uuid: u64,
11980    #[doc = "Timestamp (time since system boot)."]
11981    pub time_boot_ms: u32,
11982    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11983    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11984    pub landing_time: u32,
11985}
11986impl FLIGHT_INFORMATION_DATA {
11987    pub const ENCODED_LEN: usize = 32usize;
11988    pub const DEFAULT: Self = Self {
11989        arming_time_utc: 0_u64,
11990        takeoff_time_utc: 0_u64,
11991        flight_uuid: 0_u64,
11992        time_boot_ms: 0_u32,
11993        landing_time: 0_u32,
11994    };
11995    #[cfg(feature = "arbitrary")]
11996    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11997        use arbitrary::{Arbitrary, Unstructured};
11998        let mut buf = [0u8; 1024];
11999        rng.fill_bytes(&mut buf);
12000        let mut unstructured = Unstructured::new(&buf);
12001        Self::arbitrary(&mut unstructured).unwrap_or_default()
12002    }
12003}
12004impl Default for FLIGHT_INFORMATION_DATA {
12005    fn default() -> Self {
12006        Self::DEFAULT.clone()
12007    }
12008}
12009impl MessageData for FLIGHT_INFORMATION_DATA {
12010    type Message = MavMessage;
12011    const ID: u32 = 264u32;
12012    const NAME: &'static str = "FLIGHT_INFORMATION";
12013    const EXTRA_CRC: u8 = 49u8;
12014    const ENCODED_LEN: usize = 32usize;
12015    fn deser(
12016        _version: MavlinkVersion,
12017        __input: &[u8],
12018    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12019        let avail_len = __input.len();
12020        let mut payload_buf = [0; Self::ENCODED_LEN];
12021        let mut buf = if avail_len < Self::ENCODED_LEN {
12022            payload_buf[0..avail_len].copy_from_slice(__input);
12023            Bytes::new(&payload_buf)
12024        } else {
12025            Bytes::new(__input)
12026        };
12027        let mut __struct = Self::default();
12028        __struct.arming_time_utc = buf.get_u64_le();
12029        __struct.takeoff_time_utc = buf.get_u64_le();
12030        __struct.flight_uuid = buf.get_u64_le();
12031        __struct.time_boot_ms = buf.get_u32_le();
12032        __struct.landing_time = buf.get_u32_le();
12033        Ok(__struct)
12034    }
12035    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12036        let mut __tmp = BytesMut::new(bytes);
12037        #[allow(clippy::absurd_extreme_comparisons)]
12038        #[allow(unused_comparisons)]
12039        if __tmp.remaining() < Self::ENCODED_LEN {
12040            panic!(
12041                "buffer is too small (need {} bytes, but got {})",
12042                Self::ENCODED_LEN,
12043                __tmp.remaining(),
12044            )
12045        }
12046        __tmp.put_u64_le(self.arming_time_utc);
12047        __tmp.put_u64_le(self.takeoff_time_utc);
12048        __tmp.put_u64_le(self.flight_uuid);
12049        __tmp.put_u32_le(self.time_boot_ms);
12050        if matches!(version, MavlinkVersion::V2) {
12051            __tmp.put_u32_le(self.landing_time);
12052            let len = __tmp.len();
12053            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12054        } else {
12055            __tmp.len()
12056        }
12057    }
12058}
12059#[doc = "Current motion information from a designated system."]
12060#[doc = ""]
12061#[doc = "ID: 144"]
12062#[derive(Debug, Clone, PartialEq)]
12063#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12064#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12065#[cfg_attr(feature = "ts", derive(TS))]
12066#[cfg_attr(feature = "ts", ts(export))]
12067pub struct FOLLOW_TARGET_DATA {
12068    #[doc = "Timestamp (time since system boot)."]
12069    pub timestamp: u64,
12070    #[doc = "button states or switches of a tracker device"]
12071    pub custom_state: u64,
12072    #[doc = "Latitude (WGS84)"]
12073    pub lat: i32,
12074    #[doc = "Longitude (WGS84)"]
12075    pub lon: i32,
12076    #[doc = "Altitude (MSL)"]
12077    pub alt: f32,
12078    #[doc = "target velocity (0,0,0) for unknown"]
12079    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12080    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12081    pub vel: [f32; 3],
12082    #[doc = "linear target acceleration (0,0,0) for unknown"]
12083    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12084    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12085    pub acc: [f32; 3],
12086    #[doc = "(0 0 0 0 for unknown)"]
12087    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12088    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12089    pub attitude_q: [f32; 4],
12090    #[doc = "(0 0 0 for unknown)"]
12091    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12092    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12093    pub rates: [f32; 3],
12094    #[doc = "eph epv"]
12095    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12096    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12097    pub position_cov: [f32; 3],
12098    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12099    pub est_capabilities: u8,
12100}
12101impl FOLLOW_TARGET_DATA {
12102    pub const ENCODED_LEN: usize = 93usize;
12103    pub const DEFAULT: Self = Self {
12104        timestamp: 0_u64,
12105        custom_state: 0_u64,
12106        lat: 0_i32,
12107        lon: 0_i32,
12108        alt: 0.0_f32,
12109        vel: [0.0_f32; 3usize],
12110        acc: [0.0_f32; 3usize],
12111        attitude_q: [0.0_f32; 4usize],
12112        rates: [0.0_f32; 3usize],
12113        position_cov: [0.0_f32; 3usize],
12114        est_capabilities: 0_u8,
12115    };
12116    #[cfg(feature = "arbitrary")]
12117    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12118        use arbitrary::{Arbitrary, Unstructured};
12119        let mut buf = [0u8; 1024];
12120        rng.fill_bytes(&mut buf);
12121        let mut unstructured = Unstructured::new(&buf);
12122        Self::arbitrary(&mut unstructured).unwrap_or_default()
12123    }
12124}
12125impl Default for FOLLOW_TARGET_DATA {
12126    fn default() -> Self {
12127        Self::DEFAULT.clone()
12128    }
12129}
12130impl MessageData for FOLLOW_TARGET_DATA {
12131    type Message = MavMessage;
12132    const ID: u32 = 144u32;
12133    const NAME: &'static str = "FOLLOW_TARGET";
12134    const EXTRA_CRC: u8 = 127u8;
12135    const ENCODED_LEN: usize = 93usize;
12136    fn deser(
12137        _version: MavlinkVersion,
12138        __input: &[u8],
12139    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12140        let avail_len = __input.len();
12141        let mut payload_buf = [0; Self::ENCODED_LEN];
12142        let mut buf = if avail_len < Self::ENCODED_LEN {
12143            payload_buf[0..avail_len].copy_from_slice(__input);
12144            Bytes::new(&payload_buf)
12145        } else {
12146            Bytes::new(__input)
12147        };
12148        let mut __struct = Self::default();
12149        __struct.timestamp = buf.get_u64_le();
12150        __struct.custom_state = buf.get_u64_le();
12151        __struct.lat = buf.get_i32_le();
12152        __struct.lon = buf.get_i32_le();
12153        __struct.alt = buf.get_f32_le();
12154        for v in &mut __struct.vel {
12155            let val = buf.get_f32_le();
12156            *v = val;
12157        }
12158        for v in &mut __struct.acc {
12159            let val = buf.get_f32_le();
12160            *v = val;
12161        }
12162        for v in &mut __struct.attitude_q {
12163            let val = buf.get_f32_le();
12164            *v = val;
12165        }
12166        for v in &mut __struct.rates {
12167            let val = buf.get_f32_le();
12168            *v = val;
12169        }
12170        for v in &mut __struct.position_cov {
12171            let val = buf.get_f32_le();
12172            *v = val;
12173        }
12174        __struct.est_capabilities = buf.get_u8();
12175        Ok(__struct)
12176    }
12177    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12178        let mut __tmp = BytesMut::new(bytes);
12179        #[allow(clippy::absurd_extreme_comparisons)]
12180        #[allow(unused_comparisons)]
12181        if __tmp.remaining() < Self::ENCODED_LEN {
12182            panic!(
12183                "buffer is too small (need {} bytes, but got {})",
12184                Self::ENCODED_LEN,
12185                __tmp.remaining(),
12186            )
12187        }
12188        __tmp.put_u64_le(self.timestamp);
12189        __tmp.put_u64_le(self.custom_state);
12190        __tmp.put_i32_le(self.lat);
12191        __tmp.put_i32_le(self.lon);
12192        __tmp.put_f32_le(self.alt);
12193        for val in &self.vel {
12194            __tmp.put_f32_le(*val);
12195        }
12196        for val in &self.acc {
12197            __tmp.put_f32_le(*val);
12198        }
12199        for val in &self.attitude_q {
12200            __tmp.put_f32_le(*val);
12201        }
12202        for val in &self.rates {
12203            __tmp.put_f32_le(*val);
12204        }
12205        for val in &self.position_cov {
12206            __tmp.put_f32_le(*val);
12207        }
12208        __tmp.put_u8(self.est_capabilities);
12209        if matches!(version, MavlinkVersion::V2) {
12210            let len = __tmp.len();
12211            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12212        } else {
12213            __tmp.len()
12214        }
12215    }
12216}
12217#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12218#[doc = ""]
12219#[doc = "ID: 371"]
12220#[derive(Debug, Clone, PartialEq)]
12221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12223#[cfg_attr(feature = "ts", derive(TS))]
12224#[cfg_attr(feature = "ts", ts(export))]
12225pub struct FUEL_STATUS_DATA {
12226    #[doc = "Capacity when full. Must be provided."]
12227    pub maximum_fuel: f32,
12228    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12229    pub consumed_fuel: f32,
12230    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12231    pub remaining_fuel: f32,
12232    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12233    pub flow_rate: f32,
12234    #[doc = "Fuel temperature. NaN: field not provided."]
12235    pub temperature: f32,
12236    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12237    pub fuel_type: MavFuelType,
12238    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12239    pub id: u8,
12240    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12241    pub percent_remaining: u8,
12242}
12243impl FUEL_STATUS_DATA {
12244    pub const ENCODED_LEN: usize = 26usize;
12245    pub const DEFAULT: Self = Self {
12246        maximum_fuel: 0.0_f32,
12247        consumed_fuel: 0.0_f32,
12248        remaining_fuel: 0.0_f32,
12249        flow_rate: 0.0_f32,
12250        temperature: 0.0_f32,
12251        fuel_type: MavFuelType::DEFAULT,
12252        id: 0_u8,
12253        percent_remaining: 0_u8,
12254    };
12255    #[cfg(feature = "arbitrary")]
12256    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12257        use arbitrary::{Arbitrary, Unstructured};
12258        let mut buf = [0u8; 1024];
12259        rng.fill_bytes(&mut buf);
12260        let mut unstructured = Unstructured::new(&buf);
12261        Self::arbitrary(&mut unstructured).unwrap_or_default()
12262    }
12263}
12264impl Default for FUEL_STATUS_DATA {
12265    fn default() -> Self {
12266        Self::DEFAULT.clone()
12267    }
12268}
12269impl MessageData for FUEL_STATUS_DATA {
12270    type Message = MavMessage;
12271    const ID: u32 = 371u32;
12272    const NAME: &'static str = "FUEL_STATUS";
12273    const EXTRA_CRC: u8 = 10u8;
12274    const ENCODED_LEN: usize = 26usize;
12275    fn deser(
12276        _version: MavlinkVersion,
12277        __input: &[u8],
12278    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12279        let avail_len = __input.len();
12280        let mut payload_buf = [0; Self::ENCODED_LEN];
12281        let mut buf = if avail_len < Self::ENCODED_LEN {
12282            payload_buf[0..avail_len].copy_from_slice(__input);
12283            Bytes::new(&payload_buf)
12284        } else {
12285            Bytes::new(__input)
12286        };
12287        let mut __struct = Self::default();
12288        __struct.maximum_fuel = buf.get_f32_le();
12289        __struct.consumed_fuel = buf.get_f32_le();
12290        __struct.remaining_fuel = buf.get_f32_le();
12291        __struct.flow_rate = buf.get_f32_le();
12292        __struct.temperature = buf.get_f32_le();
12293        let tmp = buf.get_u32_le();
12294        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12295            ::mavlink_core::error::ParserError::InvalidEnum {
12296                enum_type: "MavFuelType",
12297                value: tmp as u64,
12298            },
12299        )?;
12300        __struct.id = buf.get_u8();
12301        __struct.percent_remaining = buf.get_u8();
12302        Ok(__struct)
12303    }
12304    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12305        let mut __tmp = BytesMut::new(bytes);
12306        #[allow(clippy::absurd_extreme_comparisons)]
12307        #[allow(unused_comparisons)]
12308        if __tmp.remaining() < Self::ENCODED_LEN {
12309            panic!(
12310                "buffer is too small (need {} bytes, but got {})",
12311                Self::ENCODED_LEN,
12312                __tmp.remaining(),
12313            )
12314        }
12315        __tmp.put_f32_le(self.maximum_fuel);
12316        __tmp.put_f32_le(self.consumed_fuel);
12317        __tmp.put_f32_le(self.remaining_fuel);
12318        __tmp.put_f32_le(self.flow_rate);
12319        __tmp.put_f32_le(self.temperature);
12320        __tmp.put_u32_le(self.fuel_type as u32);
12321        __tmp.put_u8(self.id);
12322        __tmp.put_u8(self.percent_remaining);
12323        if matches!(version, MavlinkVersion::V2) {
12324            let len = __tmp.len();
12325            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12326        } else {
12327            __tmp.len()
12328        }
12329    }
12330}
12331#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12332#[doc = ""]
12333#[doc = "ID: 373"]
12334#[derive(Debug, Clone, PartialEq)]
12335#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12336#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12337#[cfg_attr(feature = "ts", derive(TS))]
12338#[cfg_attr(feature = "ts", ts(export))]
12339pub struct GENERATOR_STATUS_DATA {
12340    #[doc = "Status flags."]
12341    pub status: MavGeneratorStatusFlag,
12342    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12343    pub battery_current: f32,
12344    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12345    pub load_current: f32,
12346    #[doc = "The power being generated. NaN: field not provided"]
12347    pub power_generated: f32,
12348    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12349    pub bus_voltage: f32,
12350    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12351    pub bat_current_setpoint: f32,
12352    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12353    pub runtime: u32,
12354    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12355    pub time_until_maintenance: i32,
12356    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12357    pub generator_speed: u16,
12358    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12359    pub rectifier_temperature: i16,
12360    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12361    pub generator_temperature: i16,
12362}
12363impl GENERATOR_STATUS_DATA {
12364    pub const ENCODED_LEN: usize = 42usize;
12365    pub const DEFAULT: Self = Self {
12366        status: MavGeneratorStatusFlag::DEFAULT,
12367        battery_current: 0.0_f32,
12368        load_current: 0.0_f32,
12369        power_generated: 0.0_f32,
12370        bus_voltage: 0.0_f32,
12371        bat_current_setpoint: 0.0_f32,
12372        runtime: 0_u32,
12373        time_until_maintenance: 0_i32,
12374        generator_speed: 0_u16,
12375        rectifier_temperature: 0_i16,
12376        generator_temperature: 0_i16,
12377    };
12378    #[cfg(feature = "arbitrary")]
12379    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12380        use arbitrary::{Arbitrary, Unstructured};
12381        let mut buf = [0u8; 1024];
12382        rng.fill_bytes(&mut buf);
12383        let mut unstructured = Unstructured::new(&buf);
12384        Self::arbitrary(&mut unstructured).unwrap_or_default()
12385    }
12386}
12387impl Default for GENERATOR_STATUS_DATA {
12388    fn default() -> Self {
12389        Self::DEFAULT.clone()
12390    }
12391}
12392impl MessageData for GENERATOR_STATUS_DATA {
12393    type Message = MavMessage;
12394    const ID: u32 = 373u32;
12395    const NAME: &'static str = "GENERATOR_STATUS";
12396    const EXTRA_CRC: u8 = 117u8;
12397    const ENCODED_LEN: usize = 42usize;
12398    fn deser(
12399        _version: MavlinkVersion,
12400        __input: &[u8],
12401    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12402        let avail_len = __input.len();
12403        let mut payload_buf = [0; Self::ENCODED_LEN];
12404        let mut buf = if avail_len < Self::ENCODED_LEN {
12405            payload_buf[0..avail_len].copy_from_slice(__input);
12406            Bytes::new(&payload_buf)
12407        } else {
12408            Bytes::new(__input)
12409        };
12410        let mut __struct = Self::default();
12411        let tmp = buf.get_u64_le();
12412        __struct.status =
12413            MavGeneratorStatusFlag::from_bits(tmp as <MavGeneratorStatusFlag as Flags>::Bits)
12414                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12415                    flag_type: "MavGeneratorStatusFlag",
12416                    value: tmp as u64,
12417                })?;
12418        __struct.battery_current = buf.get_f32_le();
12419        __struct.load_current = buf.get_f32_le();
12420        __struct.power_generated = buf.get_f32_le();
12421        __struct.bus_voltage = buf.get_f32_le();
12422        __struct.bat_current_setpoint = buf.get_f32_le();
12423        __struct.runtime = buf.get_u32_le();
12424        __struct.time_until_maintenance = buf.get_i32_le();
12425        __struct.generator_speed = buf.get_u16_le();
12426        __struct.rectifier_temperature = buf.get_i16_le();
12427        __struct.generator_temperature = buf.get_i16_le();
12428        Ok(__struct)
12429    }
12430    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12431        let mut __tmp = BytesMut::new(bytes);
12432        #[allow(clippy::absurd_extreme_comparisons)]
12433        #[allow(unused_comparisons)]
12434        if __tmp.remaining() < Self::ENCODED_LEN {
12435            panic!(
12436                "buffer is too small (need {} bytes, but got {})",
12437                Self::ENCODED_LEN,
12438                __tmp.remaining(),
12439            )
12440        }
12441        __tmp.put_u64_le(self.status.bits() as u64);
12442        __tmp.put_f32_le(self.battery_current);
12443        __tmp.put_f32_le(self.load_current);
12444        __tmp.put_f32_le(self.power_generated);
12445        __tmp.put_f32_le(self.bus_voltage);
12446        __tmp.put_f32_le(self.bat_current_setpoint);
12447        __tmp.put_u32_le(self.runtime);
12448        __tmp.put_i32_le(self.time_until_maintenance);
12449        __tmp.put_u16_le(self.generator_speed);
12450        __tmp.put_i16_le(self.rectifier_temperature);
12451        __tmp.put_i16_le(self.generator_temperature);
12452        if matches!(version, MavlinkVersion::V2) {
12453            let len = __tmp.len();
12454            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12455        } else {
12456            __tmp.len()
12457        }
12458    }
12459}
12460#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12461#[doc = ""]
12462#[doc = "ID: 285"]
12463#[derive(Debug, Clone, PartialEq)]
12464#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12465#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12466#[cfg_attr(feature = "ts", derive(TS))]
12467#[cfg_attr(feature = "ts", ts(export))]
12468pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12469    #[doc = "Timestamp (time since system boot)."]
12470    pub time_boot_ms: u32,
12471    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12472    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12473    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12474    pub q: [f32; 4],
12475    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12476    pub angular_velocity_x: f32,
12477    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12478    pub angular_velocity_y: f32,
12479    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12480    pub angular_velocity_z: f32,
12481    #[doc = "Failure flags (0 for no failure)"]
12482    pub failure_flags: GimbalDeviceErrorFlags,
12483    #[doc = "Current gimbal flags set."]
12484    pub flags: GimbalDeviceFlags,
12485    #[doc = "System ID"]
12486    pub target_system: u8,
12487    #[doc = "Component ID"]
12488    pub target_component: u8,
12489    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12490    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12491    pub delta_yaw: f32,
12492    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12493    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12494    pub delta_yaw_velocity: f32,
12495    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12496    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12497    pub gimbal_device_id: u8,
12498}
12499impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12500    pub const ENCODED_LEN: usize = 49usize;
12501    pub const DEFAULT: Self = Self {
12502        time_boot_ms: 0_u32,
12503        q: [0.0_f32; 4usize],
12504        angular_velocity_x: 0.0_f32,
12505        angular_velocity_y: 0.0_f32,
12506        angular_velocity_z: 0.0_f32,
12507        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12508        flags: GimbalDeviceFlags::DEFAULT,
12509        target_system: 0_u8,
12510        target_component: 0_u8,
12511        delta_yaw: 0.0_f32,
12512        delta_yaw_velocity: 0.0_f32,
12513        gimbal_device_id: 0_u8,
12514    };
12515    #[cfg(feature = "arbitrary")]
12516    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12517        use arbitrary::{Arbitrary, Unstructured};
12518        let mut buf = [0u8; 1024];
12519        rng.fill_bytes(&mut buf);
12520        let mut unstructured = Unstructured::new(&buf);
12521        Self::arbitrary(&mut unstructured).unwrap_or_default()
12522    }
12523}
12524impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12525    fn default() -> Self {
12526        Self::DEFAULT.clone()
12527    }
12528}
12529impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12530    type Message = MavMessage;
12531    const ID: u32 = 285u32;
12532    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12533    const EXTRA_CRC: u8 = 137u8;
12534    const ENCODED_LEN: usize = 49usize;
12535    fn deser(
12536        _version: MavlinkVersion,
12537        __input: &[u8],
12538    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12539        let avail_len = __input.len();
12540        let mut payload_buf = [0; Self::ENCODED_LEN];
12541        let mut buf = if avail_len < Self::ENCODED_LEN {
12542            payload_buf[0..avail_len].copy_from_slice(__input);
12543            Bytes::new(&payload_buf)
12544        } else {
12545            Bytes::new(__input)
12546        };
12547        let mut __struct = Self::default();
12548        __struct.time_boot_ms = buf.get_u32_le();
12549        for v in &mut __struct.q {
12550            let val = buf.get_f32_le();
12551            *v = val;
12552        }
12553        __struct.angular_velocity_x = buf.get_f32_le();
12554        __struct.angular_velocity_y = buf.get_f32_le();
12555        __struct.angular_velocity_z = buf.get_f32_le();
12556        let tmp = buf.get_u32_le();
12557        __struct.failure_flags =
12558            GimbalDeviceErrorFlags::from_bits(tmp as <GimbalDeviceErrorFlags as Flags>::Bits)
12559                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12560                    flag_type: "GimbalDeviceErrorFlags",
12561                    value: tmp as u64,
12562                })?;
12563        let tmp = buf.get_u16_le();
12564        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
12565            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12566                flag_type: "GimbalDeviceFlags",
12567                value: tmp as u64,
12568            })?;
12569        __struct.target_system = buf.get_u8();
12570        __struct.target_component = buf.get_u8();
12571        __struct.delta_yaw = buf.get_f32_le();
12572        __struct.delta_yaw_velocity = buf.get_f32_le();
12573        __struct.gimbal_device_id = buf.get_u8();
12574        Ok(__struct)
12575    }
12576    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12577        let mut __tmp = BytesMut::new(bytes);
12578        #[allow(clippy::absurd_extreme_comparisons)]
12579        #[allow(unused_comparisons)]
12580        if __tmp.remaining() < Self::ENCODED_LEN {
12581            panic!(
12582                "buffer is too small (need {} bytes, but got {})",
12583                Self::ENCODED_LEN,
12584                __tmp.remaining(),
12585            )
12586        }
12587        __tmp.put_u32_le(self.time_boot_ms);
12588        for val in &self.q {
12589            __tmp.put_f32_le(*val);
12590        }
12591        __tmp.put_f32_le(self.angular_velocity_x);
12592        __tmp.put_f32_le(self.angular_velocity_y);
12593        __tmp.put_f32_le(self.angular_velocity_z);
12594        __tmp.put_u32_le(self.failure_flags.bits() as u32);
12595        __tmp.put_u16_le(self.flags.bits() as u16);
12596        __tmp.put_u8(self.target_system);
12597        __tmp.put_u8(self.target_component);
12598        if matches!(version, MavlinkVersion::V2) {
12599            __tmp.put_f32_le(self.delta_yaw);
12600            __tmp.put_f32_le(self.delta_yaw_velocity);
12601            __tmp.put_u8(self.gimbal_device_id);
12602            let len = __tmp.len();
12603            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12604        } else {
12605            __tmp.len()
12606        }
12607    }
12608}
12609#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12610#[doc = ""]
12611#[doc = "ID: 283"]
12612#[derive(Debug, Clone, PartialEq)]
12613#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12614#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12615#[cfg_attr(feature = "ts", derive(TS))]
12616#[cfg_attr(feature = "ts", ts(export))]
12617pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12618    #[doc = "UID of gimbal hardware (0 if unknown)."]
12619    pub uid: u64,
12620    #[doc = "Timestamp (time since system boot)."]
12621    pub time_boot_ms: u32,
12622    #[doc = "0xff)."]
12623    pub firmware_version: u32,
12624    #[doc = "0xff)."]
12625    pub hardware_version: u32,
12626    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12627    pub roll_min: f32,
12628    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12629    pub roll_max: f32,
12630    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12631    pub pitch_min: f32,
12632    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12633    pub pitch_max: f32,
12634    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12635    pub yaw_min: f32,
12636    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12637    pub yaw_max: f32,
12638    #[doc = "Bitmap of gimbal capability flags."]
12639    pub cap_flags: GimbalDeviceCapFlags,
12640    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12641    pub custom_cap_flags: u16,
12642    #[doc = "Name of the gimbal vendor."]
12643    #[cfg_attr(feature = "ts", ts(type = "string"))]
12644    pub vendor_name: CharArray<32>,
12645    #[doc = "Name of the gimbal model."]
12646    #[cfg_attr(feature = "ts", ts(type = "string"))]
12647    pub model_name: CharArray<32>,
12648    #[doc = "Custom name of the gimbal given to it by the user."]
12649    #[cfg_attr(feature = "ts", ts(type = "string"))]
12650    pub custom_name: CharArray<32>,
12651    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12652    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12653    pub gimbal_device_id: u8,
12654}
12655impl GIMBAL_DEVICE_INFORMATION_DATA {
12656    pub const ENCODED_LEN: usize = 145usize;
12657    pub const DEFAULT: Self = Self {
12658        uid: 0_u64,
12659        time_boot_ms: 0_u32,
12660        firmware_version: 0_u32,
12661        hardware_version: 0_u32,
12662        roll_min: 0.0_f32,
12663        roll_max: 0.0_f32,
12664        pitch_min: 0.0_f32,
12665        pitch_max: 0.0_f32,
12666        yaw_min: 0.0_f32,
12667        yaw_max: 0.0_f32,
12668        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12669        custom_cap_flags: 0_u16,
12670        vendor_name: CharArray::new([0_u8; 32usize]),
12671        model_name: CharArray::new([0_u8; 32usize]),
12672        custom_name: CharArray::new([0_u8; 32usize]),
12673        gimbal_device_id: 0_u8,
12674    };
12675    #[cfg(feature = "arbitrary")]
12676    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12677        use arbitrary::{Arbitrary, Unstructured};
12678        let mut buf = [0u8; 1024];
12679        rng.fill_bytes(&mut buf);
12680        let mut unstructured = Unstructured::new(&buf);
12681        Self::arbitrary(&mut unstructured).unwrap_or_default()
12682    }
12683}
12684impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12685    fn default() -> Self {
12686        Self::DEFAULT.clone()
12687    }
12688}
12689impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12690    type Message = MavMessage;
12691    const ID: u32 = 283u32;
12692    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12693    const EXTRA_CRC: u8 = 74u8;
12694    const ENCODED_LEN: usize = 145usize;
12695    fn deser(
12696        _version: MavlinkVersion,
12697        __input: &[u8],
12698    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12699        let avail_len = __input.len();
12700        let mut payload_buf = [0; Self::ENCODED_LEN];
12701        let mut buf = if avail_len < Self::ENCODED_LEN {
12702            payload_buf[0..avail_len].copy_from_slice(__input);
12703            Bytes::new(&payload_buf)
12704        } else {
12705            Bytes::new(__input)
12706        };
12707        let mut __struct = Self::default();
12708        __struct.uid = buf.get_u64_le();
12709        __struct.time_boot_ms = buf.get_u32_le();
12710        __struct.firmware_version = buf.get_u32_le();
12711        __struct.hardware_version = buf.get_u32_le();
12712        __struct.roll_min = buf.get_f32_le();
12713        __struct.roll_max = buf.get_f32_le();
12714        __struct.pitch_min = buf.get_f32_le();
12715        __struct.pitch_max = buf.get_f32_le();
12716        __struct.yaw_min = buf.get_f32_le();
12717        __struct.yaw_max = buf.get_f32_le();
12718        let tmp = buf.get_u16_le();
12719        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12720            tmp as <GimbalDeviceCapFlags as Flags>::Bits,
12721        )
12722        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12723            flag_type: "GimbalDeviceCapFlags",
12724            value: tmp as u64,
12725        })?;
12726        __struct.custom_cap_flags = buf.get_u16_le();
12727        let mut tmp = [0_u8; 32usize];
12728        for v in &mut tmp {
12729            *v = buf.get_u8();
12730        }
12731        __struct.vendor_name = CharArray::new(tmp);
12732        let mut tmp = [0_u8; 32usize];
12733        for v in &mut tmp {
12734            *v = buf.get_u8();
12735        }
12736        __struct.model_name = CharArray::new(tmp);
12737        let mut tmp = [0_u8; 32usize];
12738        for v in &mut tmp {
12739            *v = buf.get_u8();
12740        }
12741        __struct.custom_name = CharArray::new(tmp);
12742        __struct.gimbal_device_id = buf.get_u8();
12743        Ok(__struct)
12744    }
12745    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12746        let mut __tmp = BytesMut::new(bytes);
12747        #[allow(clippy::absurd_extreme_comparisons)]
12748        #[allow(unused_comparisons)]
12749        if __tmp.remaining() < Self::ENCODED_LEN {
12750            panic!(
12751                "buffer is too small (need {} bytes, but got {})",
12752                Self::ENCODED_LEN,
12753                __tmp.remaining(),
12754            )
12755        }
12756        __tmp.put_u64_le(self.uid);
12757        __tmp.put_u32_le(self.time_boot_ms);
12758        __tmp.put_u32_le(self.firmware_version);
12759        __tmp.put_u32_le(self.hardware_version);
12760        __tmp.put_f32_le(self.roll_min);
12761        __tmp.put_f32_le(self.roll_max);
12762        __tmp.put_f32_le(self.pitch_min);
12763        __tmp.put_f32_le(self.pitch_max);
12764        __tmp.put_f32_le(self.yaw_min);
12765        __tmp.put_f32_le(self.yaw_max);
12766        __tmp.put_u16_le(self.cap_flags.bits() as u16);
12767        __tmp.put_u16_le(self.custom_cap_flags);
12768        for val in &self.vendor_name {
12769            __tmp.put_u8(*val);
12770        }
12771        for val in &self.model_name {
12772            __tmp.put_u8(*val);
12773        }
12774        for val in &self.custom_name {
12775            __tmp.put_u8(*val);
12776        }
12777        if matches!(version, MavlinkVersion::V2) {
12778            __tmp.put_u8(self.gimbal_device_id);
12779            let len = __tmp.len();
12780            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12781        } else {
12782            __tmp.len()
12783        }
12784    }
12785}
12786#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12787#[doc = ""]
12788#[doc = "ID: 284"]
12789#[derive(Debug, Clone, PartialEq)]
12790#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12791#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12792#[cfg_attr(feature = "ts", derive(TS))]
12793#[cfg_attr(feature = "ts", ts(export))]
12794pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12795    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12796    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12797    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12798    pub q: [f32; 4],
12799    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12800    pub angular_velocity_x: f32,
12801    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12802    pub angular_velocity_y: f32,
12803    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12804    pub angular_velocity_z: f32,
12805    #[doc = "Low level gimbal flags."]
12806    pub flags: GimbalDeviceFlags,
12807    #[doc = "System ID"]
12808    pub target_system: u8,
12809    #[doc = "Component ID"]
12810    pub target_component: u8,
12811}
12812impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12813    pub const ENCODED_LEN: usize = 32usize;
12814    pub const DEFAULT: Self = Self {
12815        q: [0.0_f32; 4usize],
12816        angular_velocity_x: 0.0_f32,
12817        angular_velocity_y: 0.0_f32,
12818        angular_velocity_z: 0.0_f32,
12819        flags: GimbalDeviceFlags::DEFAULT,
12820        target_system: 0_u8,
12821        target_component: 0_u8,
12822    };
12823    #[cfg(feature = "arbitrary")]
12824    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12825        use arbitrary::{Arbitrary, Unstructured};
12826        let mut buf = [0u8; 1024];
12827        rng.fill_bytes(&mut buf);
12828        let mut unstructured = Unstructured::new(&buf);
12829        Self::arbitrary(&mut unstructured).unwrap_or_default()
12830    }
12831}
12832impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12833    fn default() -> Self {
12834        Self::DEFAULT.clone()
12835    }
12836}
12837impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12838    type Message = MavMessage;
12839    const ID: u32 = 284u32;
12840    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12841    const EXTRA_CRC: u8 = 99u8;
12842    const ENCODED_LEN: usize = 32usize;
12843    fn deser(
12844        _version: MavlinkVersion,
12845        __input: &[u8],
12846    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12847        let avail_len = __input.len();
12848        let mut payload_buf = [0; Self::ENCODED_LEN];
12849        let mut buf = if avail_len < Self::ENCODED_LEN {
12850            payload_buf[0..avail_len].copy_from_slice(__input);
12851            Bytes::new(&payload_buf)
12852        } else {
12853            Bytes::new(__input)
12854        };
12855        let mut __struct = Self::default();
12856        for v in &mut __struct.q {
12857            let val = buf.get_f32_le();
12858            *v = val;
12859        }
12860        __struct.angular_velocity_x = buf.get_f32_le();
12861        __struct.angular_velocity_y = buf.get_f32_le();
12862        __struct.angular_velocity_z = buf.get_f32_le();
12863        let tmp = buf.get_u16_le();
12864        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
12865            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12866                flag_type: "GimbalDeviceFlags",
12867                value: tmp as u64,
12868            })?;
12869        __struct.target_system = buf.get_u8();
12870        __struct.target_component = buf.get_u8();
12871        Ok(__struct)
12872    }
12873    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12874        let mut __tmp = BytesMut::new(bytes);
12875        #[allow(clippy::absurd_extreme_comparisons)]
12876        #[allow(unused_comparisons)]
12877        if __tmp.remaining() < Self::ENCODED_LEN {
12878            panic!(
12879                "buffer is too small (need {} bytes, but got {})",
12880                Self::ENCODED_LEN,
12881                __tmp.remaining(),
12882            )
12883        }
12884        for val in &self.q {
12885            __tmp.put_f32_le(*val);
12886        }
12887        __tmp.put_f32_le(self.angular_velocity_x);
12888        __tmp.put_f32_le(self.angular_velocity_y);
12889        __tmp.put_f32_le(self.angular_velocity_z);
12890        __tmp.put_u16_le(self.flags.bits() as u16);
12891        __tmp.put_u8(self.target_system);
12892        __tmp.put_u8(self.target_component);
12893        if matches!(version, MavlinkVersion::V2) {
12894            let len = __tmp.len();
12895            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12896        } else {
12897            __tmp.len()
12898        }
12899    }
12900}
12901#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12902#[doc = ""]
12903#[doc = "ID: 280"]
12904#[derive(Debug, Clone, PartialEq)]
12905#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12906#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12907#[cfg_attr(feature = "ts", derive(TS))]
12908#[cfg_attr(feature = "ts", ts(export))]
12909pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12910    #[doc = "Timestamp (time since system boot)."]
12911    pub time_boot_ms: u32,
12912    #[doc = "Bitmap of gimbal capability flags."]
12913    pub cap_flags: GimbalManagerCapFlags,
12914    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12915    pub roll_min: f32,
12916    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12917    pub roll_max: f32,
12918    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12919    pub pitch_min: f32,
12920    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12921    pub pitch_max: f32,
12922    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12923    pub yaw_min: f32,
12924    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12925    pub yaw_max: f32,
12926    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12927    pub gimbal_device_id: u8,
12928}
12929impl GIMBAL_MANAGER_INFORMATION_DATA {
12930    pub const ENCODED_LEN: usize = 33usize;
12931    pub const DEFAULT: Self = Self {
12932        time_boot_ms: 0_u32,
12933        cap_flags: GimbalManagerCapFlags::DEFAULT,
12934        roll_min: 0.0_f32,
12935        roll_max: 0.0_f32,
12936        pitch_min: 0.0_f32,
12937        pitch_max: 0.0_f32,
12938        yaw_min: 0.0_f32,
12939        yaw_max: 0.0_f32,
12940        gimbal_device_id: 0_u8,
12941    };
12942    #[cfg(feature = "arbitrary")]
12943    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12944        use arbitrary::{Arbitrary, Unstructured};
12945        let mut buf = [0u8; 1024];
12946        rng.fill_bytes(&mut buf);
12947        let mut unstructured = Unstructured::new(&buf);
12948        Self::arbitrary(&mut unstructured).unwrap_or_default()
12949    }
12950}
12951impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12952    fn default() -> Self {
12953        Self::DEFAULT.clone()
12954    }
12955}
12956impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12957    type Message = MavMessage;
12958    const ID: u32 = 280u32;
12959    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12960    const EXTRA_CRC: u8 = 70u8;
12961    const ENCODED_LEN: usize = 33usize;
12962    fn deser(
12963        _version: MavlinkVersion,
12964        __input: &[u8],
12965    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12966        let avail_len = __input.len();
12967        let mut payload_buf = [0; Self::ENCODED_LEN];
12968        let mut buf = if avail_len < Self::ENCODED_LEN {
12969            payload_buf[0..avail_len].copy_from_slice(__input);
12970            Bytes::new(&payload_buf)
12971        } else {
12972            Bytes::new(__input)
12973        };
12974        let mut __struct = Self::default();
12975        __struct.time_boot_ms = buf.get_u32_le();
12976        let tmp = buf.get_u32_le();
12977        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
12978            tmp as <GimbalManagerCapFlags as Flags>::Bits,
12979        )
12980        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12981            flag_type: "GimbalManagerCapFlags",
12982            value: tmp as u64,
12983        })?;
12984        __struct.roll_min = buf.get_f32_le();
12985        __struct.roll_max = buf.get_f32_le();
12986        __struct.pitch_min = buf.get_f32_le();
12987        __struct.pitch_max = buf.get_f32_le();
12988        __struct.yaw_min = buf.get_f32_le();
12989        __struct.yaw_max = buf.get_f32_le();
12990        __struct.gimbal_device_id = buf.get_u8();
12991        Ok(__struct)
12992    }
12993    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12994        let mut __tmp = BytesMut::new(bytes);
12995        #[allow(clippy::absurd_extreme_comparisons)]
12996        #[allow(unused_comparisons)]
12997        if __tmp.remaining() < Self::ENCODED_LEN {
12998            panic!(
12999                "buffer is too small (need {} bytes, but got {})",
13000                Self::ENCODED_LEN,
13001                __tmp.remaining(),
13002            )
13003        }
13004        __tmp.put_u32_le(self.time_boot_ms);
13005        __tmp.put_u32_le(self.cap_flags.bits() as u32);
13006        __tmp.put_f32_le(self.roll_min);
13007        __tmp.put_f32_le(self.roll_max);
13008        __tmp.put_f32_le(self.pitch_min);
13009        __tmp.put_f32_le(self.pitch_max);
13010        __tmp.put_f32_le(self.yaw_min);
13011        __tmp.put_f32_le(self.yaw_max);
13012        __tmp.put_u8(self.gimbal_device_id);
13013        if matches!(version, MavlinkVersion::V2) {
13014            let len = __tmp.len();
13015            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13016        } else {
13017            __tmp.len()
13018        }
13019    }
13020}
13021#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13022#[doc = ""]
13023#[doc = "ID: 282"]
13024#[derive(Debug, Clone, PartialEq)]
13025#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13026#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13027#[cfg_attr(feature = "ts", derive(TS))]
13028#[cfg_attr(feature = "ts", ts(export))]
13029pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13030    #[doc = "High level gimbal manager flags to use."]
13031    pub flags: GimbalManagerFlags,
13032    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13033    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13034    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13035    pub q: [f32; 4],
13036    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13037    pub angular_velocity_x: f32,
13038    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13039    pub angular_velocity_y: f32,
13040    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13041    pub angular_velocity_z: f32,
13042    #[doc = "System ID"]
13043    pub target_system: u8,
13044    #[doc = "Component ID"]
13045    pub target_component: u8,
13046    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13047    pub gimbal_device_id: u8,
13048}
13049impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13050    pub const ENCODED_LEN: usize = 35usize;
13051    pub const DEFAULT: Self = Self {
13052        flags: GimbalManagerFlags::DEFAULT,
13053        q: [0.0_f32; 4usize],
13054        angular_velocity_x: 0.0_f32,
13055        angular_velocity_y: 0.0_f32,
13056        angular_velocity_z: 0.0_f32,
13057        target_system: 0_u8,
13058        target_component: 0_u8,
13059        gimbal_device_id: 0_u8,
13060    };
13061    #[cfg(feature = "arbitrary")]
13062    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13063        use arbitrary::{Arbitrary, Unstructured};
13064        let mut buf = [0u8; 1024];
13065        rng.fill_bytes(&mut buf);
13066        let mut unstructured = Unstructured::new(&buf);
13067        Self::arbitrary(&mut unstructured).unwrap_or_default()
13068    }
13069}
13070impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13071    fn default() -> Self {
13072        Self::DEFAULT.clone()
13073    }
13074}
13075impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13076    type Message = MavMessage;
13077    const ID: u32 = 282u32;
13078    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13079    const EXTRA_CRC: u8 = 123u8;
13080    const ENCODED_LEN: usize = 35usize;
13081    fn deser(
13082        _version: MavlinkVersion,
13083        __input: &[u8],
13084    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13085        let avail_len = __input.len();
13086        let mut payload_buf = [0; Self::ENCODED_LEN];
13087        let mut buf = if avail_len < Self::ENCODED_LEN {
13088            payload_buf[0..avail_len].copy_from_slice(__input);
13089            Bytes::new(&payload_buf)
13090        } else {
13091            Bytes::new(__input)
13092        };
13093        let mut __struct = Self::default();
13094        let tmp = buf.get_u32_le();
13095        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13096            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13097                flag_type: "GimbalManagerFlags",
13098                value: tmp as u64,
13099            })?;
13100        for v in &mut __struct.q {
13101            let val = buf.get_f32_le();
13102            *v = val;
13103        }
13104        __struct.angular_velocity_x = buf.get_f32_le();
13105        __struct.angular_velocity_y = buf.get_f32_le();
13106        __struct.angular_velocity_z = buf.get_f32_le();
13107        __struct.target_system = buf.get_u8();
13108        __struct.target_component = buf.get_u8();
13109        __struct.gimbal_device_id = buf.get_u8();
13110        Ok(__struct)
13111    }
13112    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13113        let mut __tmp = BytesMut::new(bytes);
13114        #[allow(clippy::absurd_extreme_comparisons)]
13115        #[allow(unused_comparisons)]
13116        if __tmp.remaining() < Self::ENCODED_LEN {
13117            panic!(
13118                "buffer is too small (need {} bytes, but got {})",
13119                Self::ENCODED_LEN,
13120                __tmp.remaining(),
13121            )
13122        }
13123        __tmp.put_u32_le(self.flags.bits() as u32);
13124        for val in &self.q {
13125            __tmp.put_f32_le(*val);
13126        }
13127        __tmp.put_f32_le(self.angular_velocity_x);
13128        __tmp.put_f32_le(self.angular_velocity_y);
13129        __tmp.put_f32_le(self.angular_velocity_z);
13130        __tmp.put_u8(self.target_system);
13131        __tmp.put_u8(self.target_component);
13132        __tmp.put_u8(self.gimbal_device_id);
13133        if matches!(version, MavlinkVersion::V2) {
13134            let len = __tmp.len();
13135            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13136        } else {
13137            __tmp.len()
13138        }
13139    }
13140}
13141#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13142#[doc = ""]
13143#[doc = "ID: 288"]
13144#[derive(Debug, Clone, PartialEq)]
13145#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13146#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13147#[cfg_attr(feature = "ts", derive(TS))]
13148#[cfg_attr(feature = "ts", ts(export))]
13149pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13150    #[doc = "High level gimbal manager flags."]
13151    pub flags: GimbalManagerFlags,
13152    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13153    pub pitch: f32,
13154    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13155    pub yaw: f32,
13156    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13157    pub pitch_rate: f32,
13158    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13159    pub yaw_rate: f32,
13160    #[doc = "System ID"]
13161    pub target_system: u8,
13162    #[doc = "Component ID"]
13163    pub target_component: u8,
13164    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13165    pub gimbal_device_id: u8,
13166}
13167impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13168    pub const ENCODED_LEN: usize = 23usize;
13169    pub const DEFAULT: Self = Self {
13170        flags: GimbalManagerFlags::DEFAULT,
13171        pitch: 0.0_f32,
13172        yaw: 0.0_f32,
13173        pitch_rate: 0.0_f32,
13174        yaw_rate: 0.0_f32,
13175        target_system: 0_u8,
13176        target_component: 0_u8,
13177        gimbal_device_id: 0_u8,
13178    };
13179    #[cfg(feature = "arbitrary")]
13180    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13181        use arbitrary::{Arbitrary, Unstructured};
13182        let mut buf = [0u8; 1024];
13183        rng.fill_bytes(&mut buf);
13184        let mut unstructured = Unstructured::new(&buf);
13185        Self::arbitrary(&mut unstructured).unwrap_or_default()
13186    }
13187}
13188impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13189    fn default() -> Self {
13190        Self::DEFAULT.clone()
13191    }
13192}
13193impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13194    type Message = MavMessage;
13195    const ID: u32 = 288u32;
13196    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13197    const EXTRA_CRC: u8 = 20u8;
13198    const ENCODED_LEN: usize = 23usize;
13199    fn deser(
13200        _version: MavlinkVersion,
13201        __input: &[u8],
13202    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13203        let avail_len = __input.len();
13204        let mut payload_buf = [0; Self::ENCODED_LEN];
13205        let mut buf = if avail_len < Self::ENCODED_LEN {
13206            payload_buf[0..avail_len].copy_from_slice(__input);
13207            Bytes::new(&payload_buf)
13208        } else {
13209            Bytes::new(__input)
13210        };
13211        let mut __struct = Self::default();
13212        let tmp = buf.get_u32_le();
13213        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13214            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13215                flag_type: "GimbalManagerFlags",
13216                value: tmp as u64,
13217            })?;
13218        __struct.pitch = buf.get_f32_le();
13219        __struct.yaw = buf.get_f32_le();
13220        __struct.pitch_rate = buf.get_f32_le();
13221        __struct.yaw_rate = buf.get_f32_le();
13222        __struct.target_system = buf.get_u8();
13223        __struct.target_component = buf.get_u8();
13224        __struct.gimbal_device_id = buf.get_u8();
13225        Ok(__struct)
13226    }
13227    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13228        let mut __tmp = BytesMut::new(bytes);
13229        #[allow(clippy::absurd_extreme_comparisons)]
13230        #[allow(unused_comparisons)]
13231        if __tmp.remaining() < Self::ENCODED_LEN {
13232            panic!(
13233                "buffer is too small (need {} bytes, but got {})",
13234                Self::ENCODED_LEN,
13235                __tmp.remaining(),
13236            )
13237        }
13238        __tmp.put_u32_le(self.flags.bits() as u32);
13239        __tmp.put_f32_le(self.pitch);
13240        __tmp.put_f32_le(self.yaw);
13241        __tmp.put_f32_le(self.pitch_rate);
13242        __tmp.put_f32_le(self.yaw_rate);
13243        __tmp.put_u8(self.target_system);
13244        __tmp.put_u8(self.target_component);
13245        __tmp.put_u8(self.gimbal_device_id);
13246        if matches!(version, MavlinkVersion::V2) {
13247            let len = __tmp.len();
13248            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13249        } else {
13250            __tmp.len()
13251        }
13252    }
13253}
13254#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13255#[doc = ""]
13256#[doc = "ID: 287"]
13257#[derive(Debug, Clone, PartialEq)]
13258#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13260#[cfg_attr(feature = "ts", derive(TS))]
13261#[cfg_attr(feature = "ts", ts(export))]
13262pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13263    #[doc = "High level gimbal manager flags to use."]
13264    pub flags: GimbalManagerFlags,
13265    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13266    pub pitch: f32,
13267    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13268    pub yaw: f32,
13269    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13270    pub pitch_rate: f32,
13271    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13272    pub yaw_rate: f32,
13273    #[doc = "System ID"]
13274    pub target_system: u8,
13275    #[doc = "Component ID"]
13276    pub target_component: u8,
13277    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13278    pub gimbal_device_id: u8,
13279}
13280impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13281    pub const ENCODED_LEN: usize = 23usize;
13282    pub const DEFAULT: Self = Self {
13283        flags: GimbalManagerFlags::DEFAULT,
13284        pitch: 0.0_f32,
13285        yaw: 0.0_f32,
13286        pitch_rate: 0.0_f32,
13287        yaw_rate: 0.0_f32,
13288        target_system: 0_u8,
13289        target_component: 0_u8,
13290        gimbal_device_id: 0_u8,
13291    };
13292    #[cfg(feature = "arbitrary")]
13293    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13294        use arbitrary::{Arbitrary, Unstructured};
13295        let mut buf = [0u8; 1024];
13296        rng.fill_bytes(&mut buf);
13297        let mut unstructured = Unstructured::new(&buf);
13298        Self::arbitrary(&mut unstructured).unwrap_or_default()
13299    }
13300}
13301impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13302    fn default() -> Self {
13303        Self::DEFAULT.clone()
13304    }
13305}
13306impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13307    type Message = MavMessage;
13308    const ID: u32 = 287u32;
13309    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13310    const EXTRA_CRC: u8 = 1u8;
13311    const ENCODED_LEN: usize = 23usize;
13312    fn deser(
13313        _version: MavlinkVersion,
13314        __input: &[u8],
13315    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13316        let avail_len = __input.len();
13317        let mut payload_buf = [0; Self::ENCODED_LEN];
13318        let mut buf = if avail_len < Self::ENCODED_LEN {
13319            payload_buf[0..avail_len].copy_from_slice(__input);
13320            Bytes::new(&payload_buf)
13321        } else {
13322            Bytes::new(__input)
13323        };
13324        let mut __struct = Self::default();
13325        let tmp = buf.get_u32_le();
13326        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13327            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13328                flag_type: "GimbalManagerFlags",
13329                value: tmp as u64,
13330            })?;
13331        __struct.pitch = buf.get_f32_le();
13332        __struct.yaw = buf.get_f32_le();
13333        __struct.pitch_rate = buf.get_f32_le();
13334        __struct.yaw_rate = buf.get_f32_le();
13335        __struct.target_system = buf.get_u8();
13336        __struct.target_component = buf.get_u8();
13337        __struct.gimbal_device_id = buf.get_u8();
13338        Ok(__struct)
13339    }
13340    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13341        let mut __tmp = BytesMut::new(bytes);
13342        #[allow(clippy::absurd_extreme_comparisons)]
13343        #[allow(unused_comparisons)]
13344        if __tmp.remaining() < Self::ENCODED_LEN {
13345            panic!(
13346                "buffer is too small (need {} bytes, but got {})",
13347                Self::ENCODED_LEN,
13348                __tmp.remaining(),
13349            )
13350        }
13351        __tmp.put_u32_le(self.flags.bits() as u32);
13352        __tmp.put_f32_le(self.pitch);
13353        __tmp.put_f32_le(self.yaw);
13354        __tmp.put_f32_le(self.pitch_rate);
13355        __tmp.put_f32_le(self.yaw_rate);
13356        __tmp.put_u8(self.target_system);
13357        __tmp.put_u8(self.target_component);
13358        __tmp.put_u8(self.gimbal_device_id);
13359        if matches!(version, MavlinkVersion::V2) {
13360            let len = __tmp.len();
13361            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13362        } else {
13363            __tmp.len()
13364        }
13365    }
13366}
13367#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13368#[doc = ""]
13369#[doc = "ID: 281"]
13370#[derive(Debug, Clone, PartialEq)]
13371#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13372#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13373#[cfg_attr(feature = "ts", derive(TS))]
13374#[cfg_attr(feature = "ts", ts(export))]
13375pub struct GIMBAL_MANAGER_STATUS_DATA {
13376    #[doc = "Timestamp (time since system boot)."]
13377    pub time_boot_ms: u32,
13378    #[doc = "High level gimbal manager flags currently applied."]
13379    pub flags: GimbalManagerFlags,
13380    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13381    pub gimbal_device_id: u8,
13382    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13383    pub primary_control_sysid: u8,
13384    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13385    pub primary_control_compid: u8,
13386    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13387    pub secondary_control_sysid: u8,
13388    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13389    pub secondary_control_compid: u8,
13390}
13391impl GIMBAL_MANAGER_STATUS_DATA {
13392    pub const ENCODED_LEN: usize = 13usize;
13393    pub const DEFAULT: Self = Self {
13394        time_boot_ms: 0_u32,
13395        flags: GimbalManagerFlags::DEFAULT,
13396        gimbal_device_id: 0_u8,
13397        primary_control_sysid: 0_u8,
13398        primary_control_compid: 0_u8,
13399        secondary_control_sysid: 0_u8,
13400        secondary_control_compid: 0_u8,
13401    };
13402    #[cfg(feature = "arbitrary")]
13403    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13404        use arbitrary::{Arbitrary, Unstructured};
13405        let mut buf = [0u8; 1024];
13406        rng.fill_bytes(&mut buf);
13407        let mut unstructured = Unstructured::new(&buf);
13408        Self::arbitrary(&mut unstructured).unwrap_or_default()
13409    }
13410}
13411impl Default for GIMBAL_MANAGER_STATUS_DATA {
13412    fn default() -> Self {
13413        Self::DEFAULT.clone()
13414    }
13415}
13416impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13417    type Message = MavMessage;
13418    const ID: u32 = 281u32;
13419    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13420    const EXTRA_CRC: u8 = 48u8;
13421    const ENCODED_LEN: usize = 13usize;
13422    fn deser(
13423        _version: MavlinkVersion,
13424        __input: &[u8],
13425    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13426        let avail_len = __input.len();
13427        let mut payload_buf = [0; Self::ENCODED_LEN];
13428        let mut buf = if avail_len < Self::ENCODED_LEN {
13429            payload_buf[0..avail_len].copy_from_slice(__input);
13430            Bytes::new(&payload_buf)
13431        } else {
13432            Bytes::new(__input)
13433        };
13434        let mut __struct = Self::default();
13435        __struct.time_boot_ms = buf.get_u32_le();
13436        let tmp = buf.get_u32_le();
13437        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13438            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13439                flag_type: "GimbalManagerFlags",
13440                value: tmp as u64,
13441            })?;
13442        __struct.gimbal_device_id = buf.get_u8();
13443        __struct.primary_control_sysid = buf.get_u8();
13444        __struct.primary_control_compid = buf.get_u8();
13445        __struct.secondary_control_sysid = buf.get_u8();
13446        __struct.secondary_control_compid = buf.get_u8();
13447        Ok(__struct)
13448    }
13449    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13450        let mut __tmp = BytesMut::new(bytes);
13451        #[allow(clippy::absurd_extreme_comparisons)]
13452        #[allow(unused_comparisons)]
13453        if __tmp.remaining() < Self::ENCODED_LEN {
13454            panic!(
13455                "buffer is too small (need {} bytes, but got {})",
13456                Self::ENCODED_LEN,
13457                __tmp.remaining(),
13458            )
13459        }
13460        __tmp.put_u32_le(self.time_boot_ms);
13461        __tmp.put_u32_le(self.flags.bits() as u32);
13462        __tmp.put_u8(self.gimbal_device_id);
13463        __tmp.put_u8(self.primary_control_sysid);
13464        __tmp.put_u8(self.primary_control_compid);
13465        __tmp.put_u8(self.secondary_control_sysid);
13466        __tmp.put_u8(self.secondary_control_compid);
13467        if matches!(version, MavlinkVersion::V2) {
13468            let len = __tmp.len();
13469            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13470        } else {
13471            __tmp.len()
13472        }
13473    }
13474}
13475#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13476#[doc = ""]
13477#[doc = "ID: 33"]
13478#[derive(Debug, Clone, PartialEq)]
13479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13481#[cfg_attr(feature = "ts", derive(TS))]
13482#[cfg_attr(feature = "ts", ts(export))]
13483pub struct GLOBAL_POSITION_INT_DATA {
13484    #[doc = "Timestamp (time since system boot)."]
13485    pub time_boot_ms: u32,
13486    #[doc = "Latitude, expressed"]
13487    pub lat: i32,
13488    #[doc = "Longitude, expressed"]
13489    pub lon: i32,
13490    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13491    pub alt: i32,
13492    #[doc = "Altitude above home"]
13493    pub relative_alt: i32,
13494    #[doc = "Ground X Speed (Latitude, positive north)"]
13495    pub vx: i16,
13496    #[doc = "Ground Y Speed (Longitude, positive east)"]
13497    pub vy: i16,
13498    #[doc = "Ground Z Speed (Altitude, positive down)"]
13499    pub vz: i16,
13500    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13501    pub hdg: u16,
13502}
13503impl GLOBAL_POSITION_INT_DATA {
13504    pub const ENCODED_LEN: usize = 28usize;
13505    pub const DEFAULT: Self = Self {
13506        time_boot_ms: 0_u32,
13507        lat: 0_i32,
13508        lon: 0_i32,
13509        alt: 0_i32,
13510        relative_alt: 0_i32,
13511        vx: 0_i16,
13512        vy: 0_i16,
13513        vz: 0_i16,
13514        hdg: 0_u16,
13515    };
13516    #[cfg(feature = "arbitrary")]
13517    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13518        use arbitrary::{Arbitrary, Unstructured};
13519        let mut buf = [0u8; 1024];
13520        rng.fill_bytes(&mut buf);
13521        let mut unstructured = Unstructured::new(&buf);
13522        Self::arbitrary(&mut unstructured).unwrap_or_default()
13523    }
13524}
13525impl Default for GLOBAL_POSITION_INT_DATA {
13526    fn default() -> Self {
13527        Self::DEFAULT.clone()
13528    }
13529}
13530impl MessageData for GLOBAL_POSITION_INT_DATA {
13531    type Message = MavMessage;
13532    const ID: u32 = 33u32;
13533    const NAME: &'static str = "GLOBAL_POSITION_INT";
13534    const EXTRA_CRC: u8 = 104u8;
13535    const ENCODED_LEN: usize = 28usize;
13536    fn deser(
13537        _version: MavlinkVersion,
13538        __input: &[u8],
13539    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13540        let avail_len = __input.len();
13541        let mut payload_buf = [0; Self::ENCODED_LEN];
13542        let mut buf = if avail_len < Self::ENCODED_LEN {
13543            payload_buf[0..avail_len].copy_from_slice(__input);
13544            Bytes::new(&payload_buf)
13545        } else {
13546            Bytes::new(__input)
13547        };
13548        let mut __struct = Self::default();
13549        __struct.time_boot_ms = buf.get_u32_le();
13550        __struct.lat = buf.get_i32_le();
13551        __struct.lon = buf.get_i32_le();
13552        __struct.alt = buf.get_i32_le();
13553        __struct.relative_alt = buf.get_i32_le();
13554        __struct.vx = buf.get_i16_le();
13555        __struct.vy = buf.get_i16_le();
13556        __struct.vz = buf.get_i16_le();
13557        __struct.hdg = buf.get_u16_le();
13558        Ok(__struct)
13559    }
13560    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13561        let mut __tmp = BytesMut::new(bytes);
13562        #[allow(clippy::absurd_extreme_comparisons)]
13563        #[allow(unused_comparisons)]
13564        if __tmp.remaining() < Self::ENCODED_LEN {
13565            panic!(
13566                "buffer is too small (need {} bytes, but got {})",
13567                Self::ENCODED_LEN,
13568                __tmp.remaining(),
13569            )
13570        }
13571        __tmp.put_u32_le(self.time_boot_ms);
13572        __tmp.put_i32_le(self.lat);
13573        __tmp.put_i32_le(self.lon);
13574        __tmp.put_i32_le(self.alt);
13575        __tmp.put_i32_le(self.relative_alt);
13576        __tmp.put_i16_le(self.vx);
13577        __tmp.put_i16_le(self.vy);
13578        __tmp.put_i16_le(self.vz);
13579        __tmp.put_u16_le(self.hdg);
13580        if matches!(version, MavlinkVersion::V2) {
13581            let len = __tmp.len();
13582            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13583        } else {
13584            __tmp.len()
13585        }
13586    }
13587}
13588#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13589#[doc = ""]
13590#[doc = "ID: 63"]
13591#[derive(Debug, Clone, PartialEq)]
13592#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13593#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13594#[cfg_attr(feature = "ts", derive(TS))]
13595#[cfg_attr(feature = "ts", ts(export))]
13596pub struct GLOBAL_POSITION_INT_COV_DATA {
13597    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13598    pub time_usec: u64,
13599    #[doc = "Latitude"]
13600    pub lat: i32,
13601    #[doc = "Longitude"]
13602    pub lon: i32,
13603    #[doc = "Altitude in meters above MSL"]
13604    pub alt: i32,
13605    #[doc = "Altitude above ground"]
13606    pub relative_alt: i32,
13607    #[doc = "Ground X Speed (Latitude)"]
13608    pub vx: f32,
13609    #[doc = "Ground Y Speed (Longitude)"]
13610    pub vy: f32,
13611    #[doc = "Ground Z Speed (Altitude)"]
13612    pub vz: f32,
13613    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13614    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13615    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13616    pub covariance: [f32; 36],
13617    #[doc = "Class id of the estimator this estimate originated from."]
13618    pub estimator_type: MavEstimatorType,
13619}
13620impl GLOBAL_POSITION_INT_COV_DATA {
13621    pub const ENCODED_LEN: usize = 181usize;
13622    pub const DEFAULT: Self = Self {
13623        time_usec: 0_u64,
13624        lat: 0_i32,
13625        lon: 0_i32,
13626        alt: 0_i32,
13627        relative_alt: 0_i32,
13628        vx: 0.0_f32,
13629        vy: 0.0_f32,
13630        vz: 0.0_f32,
13631        covariance: [0.0_f32; 36usize],
13632        estimator_type: MavEstimatorType::DEFAULT,
13633    };
13634    #[cfg(feature = "arbitrary")]
13635    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13636        use arbitrary::{Arbitrary, Unstructured};
13637        let mut buf = [0u8; 1024];
13638        rng.fill_bytes(&mut buf);
13639        let mut unstructured = Unstructured::new(&buf);
13640        Self::arbitrary(&mut unstructured).unwrap_or_default()
13641    }
13642}
13643impl Default for GLOBAL_POSITION_INT_COV_DATA {
13644    fn default() -> Self {
13645        Self::DEFAULT.clone()
13646    }
13647}
13648impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13649    type Message = MavMessage;
13650    const ID: u32 = 63u32;
13651    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13652    const EXTRA_CRC: u8 = 119u8;
13653    const ENCODED_LEN: usize = 181usize;
13654    fn deser(
13655        _version: MavlinkVersion,
13656        __input: &[u8],
13657    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13658        let avail_len = __input.len();
13659        let mut payload_buf = [0; Self::ENCODED_LEN];
13660        let mut buf = if avail_len < Self::ENCODED_LEN {
13661            payload_buf[0..avail_len].copy_from_slice(__input);
13662            Bytes::new(&payload_buf)
13663        } else {
13664            Bytes::new(__input)
13665        };
13666        let mut __struct = Self::default();
13667        __struct.time_usec = buf.get_u64_le();
13668        __struct.lat = buf.get_i32_le();
13669        __struct.lon = buf.get_i32_le();
13670        __struct.alt = buf.get_i32_le();
13671        __struct.relative_alt = buf.get_i32_le();
13672        __struct.vx = buf.get_f32_le();
13673        __struct.vy = buf.get_f32_le();
13674        __struct.vz = buf.get_f32_le();
13675        for v in &mut __struct.covariance {
13676            let val = buf.get_f32_le();
13677            *v = val;
13678        }
13679        let tmp = buf.get_u8();
13680        __struct.estimator_type =
13681            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13682                enum_type: "MavEstimatorType",
13683                value: tmp as u64,
13684            })?;
13685        Ok(__struct)
13686    }
13687    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13688        let mut __tmp = BytesMut::new(bytes);
13689        #[allow(clippy::absurd_extreme_comparisons)]
13690        #[allow(unused_comparisons)]
13691        if __tmp.remaining() < Self::ENCODED_LEN {
13692            panic!(
13693                "buffer is too small (need {} bytes, but got {})",
13694                Self::ENCODED_LEN,
13695                __tmp.remaining(),
13696            )
13697        }
13698        __tmp.put_u64_le(self.time_usec);
13699        __tmp.put_i32_le(self.lat);
13700        __tmp.put_i32_le(self.lon);
13701        __tmp.put_i32_le(self.alt);
13702        __tmp.put_i32_le(self.relative_alt);
13703        __tmp.put_f32_le(self.vx);
13704        __tmp.put_f32_le(self.vy);
13705        __tmp.put_f32_le(self.vz);
13706        for val in &self.covariance {
13707            __tmp.put_f32_le(*val);
13708        }
13709        __tmp.put_u8(self.estimator_type as u8);
13710        if matches!(version, MavlinkVersion::V2) {
13711            let len = __tmp.len();
13712            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13713        } else {
13714            __tmp.len()
13715        }
13716    }
13717}
13718#[doc = "Global position/attitude estimate from a vision source."]
13719#[doc = ""]
13720#[doc = "ID: 101"]
13721#[derive(Debug, Clone, PartialEq)]
13722#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13723#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13724#[cfg_attr(feature = "ts", derive(TS))]
13725#[cfg_attr(feature = "ts", ts(export))]
13726pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13727    #[doc = "Timestamp (UNIX time or since system boot)"]
13728    pub usec: u64,
13729    #[doc = "Global X position"]
13730    pub x: f32,
13731    #[doc = "Global Y position"]
13732    pub y: f32,
13733    #[doc = "Global Z position"]
13734    pub z: f32,
13735    #[doc = "Roll angle"]
13736    pub roll: f32,
13737    #[doc = "Pitch angle"]
13738    pub pitch: f32,
13739    #[doc = "Yaw angle"]
13740    pub yaw: f32,
13741    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13742    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13743    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13744    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13745    pub covariance: [f32; 21],
13746    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13747    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13748    pub reset_counter: u8,
13749}
13750impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13751    pub const ENCODED_LEN: usize = 117usize;
13752    pub const DEFAULT: Self = Self {
13753        usec: 0_u64,
13754        x: 0.0_f32,
13755        y: 0.0_f32,
13756        z: 0.0_f32,
13757        roll: 0.0_f32,
13758        pitch: 0.0_f32,
13759        yaw: 0.0_f32,
13760        covariance: [0.0_f32; 21usize],
13761        reset_counter: 0_u8,
13762    };
13763    #[cfg(feature = "arbitrary")]
13764    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13765        use arbitrary::{Arbitrary, Unstructured};
13766        let mut buf = [0u8; 1024];
13767        rng.fill_bytes(&mut buf);
13768        let mut unstructured = Unstructured::new(&buf);
13769        Self::arbitrary(&mut unstructured).unwrap_or_default()
13770    }
13771}
13772impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13773    fn default() -> Self {
13774        Self::DEFAULT.clone()
13775    }
13776}
13777impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13778    type Message = MavMessage;
13779    const ID: u32 = 101u32;
13780    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13781    const EXTRA_CRC: u8 = 102u8;
13782    const ENCODED_LEN: usize = 117usize;
13783    fn deser(
13784        _version: MavlinkVersion,
13785        __input: &[u8],
13786    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13787        let avail_len = __input.len();
13788        let mut payload_buf = [0; Self::ENCODED_LEN];
13789        let mut buf = if avail_len < Self::ENCODED_LEN {
13790            payload_buf[0..avail_len].copy_from_slice(__input);
13791            Bytes::new(&payload_buf)
13792        } else {
13793            Bytes::new(__input)
13794        };
13795        let mut __struct = Self::default();
13796        __struct.usec = buf.get_u64_le();
13797        __struct.x = buf.get_f32_le();
13798        __struct.y = buf.get_f32_le();
13799        __struct.z = buf.get_f32_le();
13800        __struct.roll = buf.get_f32_le();
13801        __struct.pitch = buf.get_f32_le();
13802        __struct.yaw = buf.get_f32_le();
13803        for v in &mut __struct.covariance {
13804            let val = buf.get_f32_le();
13805            *v = val;
13806        }
13807        __struct.reset_counter = buf.get_u8();
13808        Ok(__struct)
13809    }
13810    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13811        let mut __tmp = BytesMut::new(bytes);
13812        #[allow(clippy::absurd_extreme_comparisons)]
13813        #[allow(unused_comparisons)]
13814        if __tmp.remaining() < Self::ENCODED_LEN {
13815            panic!(
13816                "buffer is too small (need {} bytes, but got {})",
13817                Self::ENCODED_LEN,
13818                __tmp.remaining(),
13819            )
13820        }
13821        __tmp.put_u64_le(self.usec);
13822        __tmp.put_f32_le(self.x);
13823        __tmp.put_f32_le(self.y);
13824        __tmp.put_f32_le(self.z);
13825        __tmp.put_f32_le(self.roll);
13826        __tmp.put_f32_le(self.pitch);
13827        __tmp.put_f32_le(self.yaw);
13828        if matches!(version, MavlinkVersion::V2) {
13829            for val in &self.covariance {
13830                __tmp.put_f32_le(*val);
13831            }
13832            __tmp.put_u8(self.reset_counter);
13833            let len = __tmp.len();
13834            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13835        } else {
13836            __tmp.len()
13837        }
13838    }
13839}
13840#[doc = "Second GPS data."]
13841#[doc = ""]
13842#[doc = "ID: 124"]
13843#[derive(Debug, Clone, PartialEq)]
13844#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13846#[cfg_attr(feature = "ts", derive(TS))]
13847#[cfg_attr(feature = "ts", ts(export))]
13848pub struct GPS2_RAW_DATA {
13849    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13850    pub time_usec: u64,
13851    #[doc = "Latitude (WGS84)"]
13852    pub lat: i32,
13853    #[doc = "Longitude (WGS84)"]
13854    pub lon: i32,
13855    #[doc = "Altitude (MSL). Positive for up."]
13856    pub alt: i32,
13857    #[doc = "Age of DGPS info"]
13858    pub dgps_age: u32,
13859    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13860    pub eph: u16,
13861    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13862    pub epv: u16,
13863    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13864    pub vel: u16,
13865    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13866    pub cog: u16,
13867    #[doc = "GPS fix type."]
13868    pub fix_type: GpsFixType,
13869    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13870    pub satellites_visible: u8,
13871    #[doc = "Number of DGPS satellites"]
13872    pub dgps_numch: u8,
13873    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13874    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13875    pub yaw: u16,
13876    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13877    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13878    pub alt_ellipsoid: i32,
13879    #[doc = "Position uncertainty."]
13880    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13881    pub h_acc: u32,
13882    #[doc = "Altitude uncertainty."]
13883    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13884    pub v_acc: u32,
13885    #[doc = "Speed uncertainty."]
13886    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13887    pub vel_acc: u32,
13888    #[doc = "Heading / track uncertainty"]
13889    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13890    pub hdg_acc: u32,
13891}
13892impl GPS2_RAW_DATA {
13893    pub const ENCODED_LEN: usize = 57usize;
13894    pub const DEFAULT: Self = Self {
13895        time_usec: 0_u64,
13896        lat: 0_i32,
13897        lon: 0_i32,
13898        alt: 0_i32,
13899        dgps_age: 0_u32,
13900        eph: 0_u16,
13901        epv: 0_u16,
13902        vel: 0_u16,
13903        cog: 0_u16,
13904        fix_type: GpsFixType::DEFAULT,
13905        satellites_visible: 0_u8,
13906        dgps_numch: 0_u8,
13907        yaw: 0_u16,
13908        alt_ellipsoid: 0_i32,
13909        h_acc: 0_u32,
13910        v_acc: 0_u32,
13911        vel_acc: 0_u32,
13912        hdg_acc: 0_u32,
13913    };
13914    #[cfg(feature = "arbitrary")]
13915    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13916        use arbitrary::{Arbitrary, Unstructured};
13917        let mut buf = [0u8; 1024];
13918        rng.fill_bytes(&mut buf);
13919        let mut unstructured = Unstructured::new(&buf);
13920        Self::arbitrary(&mut unstructured).unwrap_or_default()
13921    }
13922}
13923impl Default for GPS2_RAW_DATA {
13924    fn default() -> Self {
13925        Self::DEFAULT.clone()
13926    }
13927}
13928impl MessageData for GPS2_RAW_DATA {
13929    type Message = MavMessage;
13930    const ID: u32 = 124u32;
13931    const NAME: &'static str = "GPS2_RAW";
13932    const EXTRA_CRC: u8 = 87u8;
13933    const ENCODED_LEN: usize = 57usize;
13934    fn deser(
13935        _version: MavlinkVersion,
13936        __input: &[u8],
13937    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13938        let avail_len = __input.len();
13939        let mut payload_buf = [0; Self::ENCODED_LEN];
13940        let mut buf = if avail_len < Self::ENCODED_LEN {
13941            payload_buf[0..avail_len].copy_from_slice(__input);
13942            Bytes::new(&payload_buf)
13943        } else {
13944            Bytes::new(__input)
13945        };
13946        let mut __struct = Self::default();
13947        __struct.time_usec = buf.get_u64_le();
13948        __struct.lat = buf.get_i32_le();
13949        __struct.lon = buf.get_i32_le();
13950        __struct.alt = buf.get_i32_le();
13951        __struct.dgps_age = buf.get_u32_le();
13952        __struct.eph = buf.get_u16_le();
13953        __struct.epv = buf.get_u16_le();
13954        __struct.vel = buf.get_u16_le();
13955        __struct.cog = buf.get_u16_le();
13956        let tmp = buf.get_u8();
13957        __struct.fix_type =
13958            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13959                enum_type: "GpsFixType",
13960                value: tmp as u64,
13961            })?;
13962        __struct.satellites_visible = buf.get_u8();
13963        __struct.dgps_numch = buf.get_u8();
13964        __struct.yaw = buf.get_u16_le();
13965        __struct.alt_ellipsoid = buf.get_i32_le();
13966        __struct.h_acc = buf.get_u32_le();
13967        __struct.v_acc = buf.get_u32_le();
13968        __struct.vel_acc = buf.get_u32_le();
13969        __struct.hdg_acc = buf.get_u32_le();
13970        Ok(__struct)
13971    }
13972    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13973        let mut __tmp = BytesMut::new(bytes);
13974        #[allow(clippy::absurd_extreme_comparisons)]
13975        #[allow(unused_comparisons)]
13976        if __tmp.remaining() < Self::ENCODED_LEN {
13977            panic!(
13978                "buffer is too small (need {} bytes, but got {})",
13979                Self::ENCODED_LEN,
13980                __tmp.remaining(),
13981            )
13982        }
13983        __tmp.put_u64_le(self.time_usec);
13984        __tmp.put_i32_le(self.lat);
13985        __tmp.put_i32_le(self.lon);
13986        __tmp.put_i32_le(self.alt);
13987        __tmp.put_u32_le(self.dgps_age);
13988        __tmp.put_u16_le(self.eph);
13989        __tmp.put_u16_le(self.epv);
13990        __tmp.put_u16_le(self.vel);
13991        __tmp.put_u16_le(self.cog);
13992        __tmp.put_u8(self.fix_type as u8);
13993        __tmp.put_u8(self.satellites_visible);
13994        __tmp.put_u8(self.dgps_numch);
13995        if matches!(version, MavlinkVersion::V2) {
13996            __tmp.put_u16_le(self.yaw);
13997            __tmp.put_i32_le(self.alt_ellipsoid);
13998            __tmp.put_u32_le(self.h_acc);
13999            __tmp.put_u32_le(self.v_acc);
14000            __tmp.put_u32_le(self.vel_acc);
14001            __tmp.put_u32_le(self.hdg_acc);
14002            let len = __tmp.len();
14003            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14004        } else {
14005            __tmp.len()
14006        }
14007    }
14008}
14009#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14010#[doc = ""]
14011#[doc = "ID: 128"]
14012#[derive(Debug, Clone, PartialEq)]
14013#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14014#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14015#[cfg_attr(feature = "ts", derive(TS))]
14016#[cfg_attr(feature = "ts", ts(export))]
14017pub struct GPS2_RTK_DATA {
14018    #[doc = "Time since boot of last baseline message received."]
14019    pub time_last_baseline_ms: u32,
14020    #[doc = "GPS Time of Week of last baseline"]
14021    pub tow: u32,
14022    #[doc = "Current baseline in ECEF x or NED north component."]
14023    pub baseline_a_mm: i32,
14024    #[doc = "Current baseline in ECEF y or NED east component."]
14025    pub baseline_b_mm: i32,
14026    #[doc = "Current baseline in ECEF z or NED down component."]
14027    pub baseline_c_mm: i32,
14028    #[doc = "Current estimate of baseline accuracy."]
14029    pub accuracy: u32,
14030    #[doc = "Current number of integer ambiguity hypotheses."]
14031    pub iar_num_hypotheses: i32,
14032    #[doc = "GPS Week Number of last baseline"]
14033    pub wn: u16,
14034    #[doc = "Identification of connected RTK receiver."]
14035    pub rtk_receiver_id: u8,
14036    #[doc = "GPS-specific health report for RTK data."]
14037    pub rtk_health: u8,
14038    #[doc = "Rate of baseline messages being received by GPS"]
14039    pub rtk_rate: u8,
14040    #[doc = "Current number of sats used for RTK calculation."]
14041    pub nsats: u8,
14042    #[doc = "Coordinate system of baseline"]
14043    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14044}
14045impl GPS2_RTK_DATA {
14046    pub const ENCODED_LEN: usize = 35usize;
14047    pub const DEFAULT: Self = Self {
14048        time_last_baseline_ms: 0_u32,
14049        tow: 0_u32,
14050        baseline_a_mm: 0_i32,
14051        baseline_b_mm: 0_i32,
14052        baseline_c_mm: 0_i32,
14053        accuracy: 0_u32,
14054        iar_num_hypotheses: 0_i32,
14055        wn: 0_u16,
14056        rtk_receiver_id: 0_u8,
14057        rtk_health: 0_u8,
14058        rtk_rate: 0_u8,
14059        nsats: 0_u8,
14060        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14061    };
14062    #[cfg(feature = "arbitrary")]
14063    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14064        use arbitrary::{Arbitrary, Unstructured};
14065        let mut buf = [0u8; 1024];
14066        rng.fill_bytes(&mut buf);
14067        let mut unstructured = Unstructured::new(&buf);
14068        Self::arbitrary(&mut unstructured).unwrap_or_default()
14069    }
14070}
14071impl Default for GPS2_RTK_DATA {
14072    fn default() -> Self {
14073        Self::DEFAULT.clone()
14074    }
14075}
14076impl MessageData for GPS2_RTK_DATA {
14077    type Message = MavMessage;
14078    const ID: u32 = 128u32;
14079    const NAME: &'static str = "GPS2_RTK";
14080    const EXTRA_CRC: u8 = 226u8;
14081    const ENCODED_LEN: usize = 35usize;
14082    fn deser(
14083        _version: MavlinkVersion,
14084        __input: &[u8],
14085    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14086        let avail_len = __input.len();
14087        let mut payload_buf = [0; Self::ENCODED_LEN];
14088        let mut buf = if avail_len < Self::ENCODED_LEN {
14089            payload_buf[0..avail_len].copy_from_slice(__input);
14090            Bytes::new(&payload_buf)
14091        } else {
14092            Bytes::new(__input)
14093        };
14094        let mut __struct = Self::default();
14095        __struct.time_last_baseline_ms = buf.get_u32_le();
14096        __struct.tow = buf.get_u32_le();
14097        __struct.baseline_a_mm = buf.get_i32_le();
14098        __struct.baseline_b_mm = buf.get_i32_le();
14099        __struct.baseline_c_mm = buf.get_i32_le();
14100        __struct.accuracy = buf.get_u32_le();
14101        __struct.iar_num_hypotheses = buf.get_i32_le();
14102        __struct.wn = buf.get_u16_le();
14103        __struct.rtk_receiver_id = buf.get_u8();
14104        __struct.rtk_health = buf.get_u8();
14105        __struct.rtk_rate = buf.get_u8();
14106        __struct.nsats = buf.get_u8();
14107        let tmp = buf.get_u8();
14108        __struct.baseline_coords_type =
14109            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14110                enum_type: "RtkBaselineCoordinateSystem",
14111                value: tmp as u64,
14112            })?;
14113        Ok(__struct)
14114    }
14115    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14116        let mut __tmp = BytesMut::new(bytes);
14117        #[allow(clippy::absurd_extreme_comparisons)]
14118        #[allow(unused_comparisons)]
14119        if __tmp.remaining() < Self::ENCODED_LEN {
14120            panic!(
14121                "buffer is too small (need {} bytes, but got {})",
14122                Self::ENCODED_LEN,
14123                __tmp.remaining(),
14124            )
14125        }
14126        __tmp.put_u32_le(self.time_last_baseline_ms);
14127        __tmp.put_u32_le(self.tow);
14128        __tmp.put_i32_le(self.baseline_a_mm);
14129        __tmp.put_i32_le(self.baseline_b_mm);
14130        __tmp.put_i32_le(self.baseline_c_mm);
14131        __tmp.put_u32_le(self.accuracy);
14132        __tmp.put_i32_le(self.iar_num_hypotheses);
14133        __tmp.put_u16_le(self.wn);
14134        __tmp.put_u8(self.rtk_receiver_id);
14135        __tmp.put_u8(self.rtk_health);
14136        __tmp.put_u8(self.rtk_rate);
14137        __tmp.put_u8(self.nsats);
14138        __tmp.put_u8(self.baseline_coords_type as u8);
14139        if matches!(version, MavlinkVersion::V2) {
14140            let len = __tmp.len();
14141            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14142        } else {
14143            __tmp.len()
14144        }
14145    }
14146}
14147#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14148#[doc = ""]
14149#[doc = "ID: 49"]
14150#[derive(Debug, Clone, PartialEq)]
14151#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14152#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14153#[cfg_attr(feature = "ts", derive(TS))]
14154#[cfg_attr(feature = "ts", ts(export))]
14155pub struct GPS_GLOBAL_ORIGIN_DATA {
14156    #[doc = "Latitude (WGS84)"]
14157    pub latitude: i32,
14158    #[doc = "Longitude (WGS84)"]
14159    pub longitude: i32,
14160    #[doc = "Altitude (MSL). Positive for up."]
14161    pub altitude: i32,
14162    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14163    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14164    pub time_usec: u64,
14165}
14166impl GPS_GLOBAL_ORIGIN_DATA {
14167    pub const ENCODED_LEN: usize = 20usize;
14168    pub const DEFAULT: Self = Self {
14169        latitude: 0_i32,
14170        longitude: 0_i32,
14171        altitude: 0_i32,
14172        time_usec: 0_u64,
14173    };
14174    #[cfg(feature = "arbitrary")]
14175    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14176        use arbitrary::{Arbitrary, Unstructured};
14177        let mut buf = [0u8; 1024];
14178        rng.fill_bytes(&mut buf);
14179        let mut unstructured = Unstructured::new(&buf);
14180        Self::arbitrary(&mut unstructured).unwrap_or_default()
14181    }
14182}
14183impl Default for GPS_GLOBAL_ORIGIN_DATA {
14184    fn default() -> Self {
14185        Self::DEFAULT.clone()
14186    }
14187}
14188impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14189    type Message = MavMessage;
14190    const ID: u32 = 49u32;
14191    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14192    const EXTRA_CRC: u8 = 39u8;
14193    const ENCODED_LEN: usize = 20usize;
14194    fn deser(
14195        _version: MavlinkVersion,
14196        __input: &[u8],
14197    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14198        let avail_len = __input.len();
14199        let mut payload_buf = [0; Self::ENCODED_LEN];
14200        let mut buf = if avail_len < Self::ENCODED_LEN {
14201            payload_buf[0..avail_len].copy_from_slice(__input);
14202            Bytes::new(&payload_buf)
14203        } else {
14204            Bytes::new(__input)
14205        };
14206        let mut __struct = Self::default();
14207        __struct.latitude = buf.get_i32_le();
14208        __struct.longitude = buf.get_i32_le();
14209        __struct.altitude = buf.get_i32_le();
14210        __struct.time_usec = buf.get_u64_le();
14211        Ok(__struct)
14212    }
14213    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14214        let mut __tmp = BytesMut::new(bytes);
14215        #[allow(clippy::absurd_extreme_comparisons)]
14216        #[allow(unused_comparisons)]
14217        if __tmp.remaining() < Self::ENCODED_LEN {
14218            panic!(
14219                "buffer is too small (need {} bytes, but got {})",
14220                Self::ENCODED_LEN,
14221                __tmp.remaining(),
14222            )
14223        }
14224        __tmp.put_i32_le(self.latitude);
14225        __tmp.put_i32_le(self.longitude);
14226        __tmp.put_i32_le(self.altitude);
14227        if matches!(version, MavlinkVersion::V2) {
14228            __tmp.put_u64_le(self.time_usec);
14229            let len = __tmp.len();
14230            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14231        } else {
14232            __tmp.len()
14233        }
14234    }
14235}
14236#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14237#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14238#[doc = ""]
14239#[doc = "ID: 123"]
14240#[derive(Debug, Clone, PartialEq)]
14241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14243#[cfg_attr(feature = "ts", derive(TS))]
14244#[cfg_attr(feature = "ts", ts(export))]
14245pub struct GPS_INJECT_DATA_DATA {
14246    #[doc = "System ID"]
14247    pub target_system: u8,
14248    #[doc = "Component ID"]
14249    pub target_component: u8,
14250    #[doc = "Data length"]
14251    pub len: u8,
14252    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14253    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14254    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14255    pub data: [u8; 110],
14256}
14257impl GPS_INJECT_DATA_DATA {
14258    pub const ENCODED_LEN: usize = 113usize;
14259    pub const DEFAULT: Self = Self {
14260        target_system: 0_u8,
14261        target_component: 0_u8,
14262        len: 0_u8,
14263        data: [0_u8; 110usize],
14264    };
14265    #[cfg(feature = "arbitrary")]
14266    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14267        use arbitrary::{Arbitrary, Unstructured};
14268        let mut buf = [0u8; 1024];
14269        rng.fill_bytes(&mut buf);
14270        let mut unstructured = Unstructured::new(&buf);
14271        Self::arbitrary(&mut unstructured).unwrap_or_default()
14272    }
14273}
14274impl Default for GPS_INJECT_DATA_DATA {
14275    fn default() -> Self {
14276        Self::DEFAULT.clone()
14277    }
14278}
14279impl MessageData for GPS_INJECT_DATA_DATA {
14280    type Message = MavMessage;
14281    const ID: u32 = 123u32;
14282    const NAME: &'static str = "GPS_INJECT_DATA";
14283    const EXTRA_CRC: u8 = 250u8;
14284    const ENCODED_LEN: usize = 113usize;
14285    fn deser(
14286        _version: MavlinkVersion,
14287        __input: &[u8],
14288    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14289        let avail_len = __input.len();
14290        let mut payload_buf = [0; Self::ENCODED_LEN];
14291        let mut buf = if avail_len < Self::ENCODED_LEN {
14292            payload_buf[0..avail_len].copy_from_slice(__input);
14293            Bytes::new(&payload_buf)
14294        } else {
14295            Bytes::new(__input)
14296        };
14297        let mut __struct = Self::default();
14298        __struct.target_system = buf.get_u8();
14299        __struct.target_component = buf.get_u8();
14300        __struct.len = buf.get_u8();
14301        for v in &mut __struct.data {
14302            let val = buf.get_u8();
14303            *v = val;
14304        }
14305        Ok(__struct)
14306    }
14307    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14308        let mut __tmp = BytesMut::new(bytes);
14309        #[allow(clippy::absurd_extreme_comparisons)]
14310        #[allow(unused_comparisons)]
14311        if __tmp.remaining() < Self::ENCODED_LEN {
14312            panic!(
14313                "buffer is too small (need {} bytes, but got {})",
14314                Self::ENCODED_LEN,
14315                __tmp.remaining(),
14316            )
14317        }
14318        __tmp.put_u8(self.target_system);
14319        __tmp.put_u8(self.target_component);
14320        __tmp.put_u8(self.len);
14321        for val in &self.data {
14322            __tmp.put_u8(*val);
14323        }
14324        if matches!(version, MavlinkVersion::V2) {
14325            let len = __tmp.len();
14326            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14327        } else {
14328            __tmp.len()
14329        }
14330    }
14331}
14332#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14333#[doc = ""]
14334#[doc = "ID: 232"]
14335#[derive(Debug, Clone, PartialEq)]
14336#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14337#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14338#[cfg_attr(feature = "ts", derive(TS))]
14339#[cfg_attr(feature = "ts", ts(export))]
14340pub struct GPS_INPUT_DATA {
14341    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14342    pub time_usec: u64,
14343    #[doc = "GPS time (from start of GPS week)"]
14344    pub time_week_ms: u32,
14345    #[doc = "Latitude (WGS84)"]
14346    pub lat: i32,
14347    #[doc = "Longitude (WGS84)"]
14348    pub lon: i32,
14349    #[doc = "Altitude (MSL). Positive for up."]
14350    pub alt: f32,
14351    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14352    pub hdop: f32,
14353    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14354    pub vdop: f32,
14355    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14356    pub vn: f32,
14357    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14358    pub ve: f32,
14359    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14360    pub vd: f32,
14361    #[doc = "GPS speed accuracy"]
14362    pub speed_accuracy: f32,
14363    #[doc = "GPS horizontal accuracy"]
14364    pub horiz_accuracy: f32,
14365    #[doc = "GPS vertical accuracy"]
14366    pub vert_accuracy: f32,
14367    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14368    pub ignore_flags: GpsInputIgnoreFlags,
14369    #[doc = "GPS week number"]
14370    pub time_week: u16,
14371    #[doc = "ID of the GPS for multiple GPS inputs"]
14372    pub gps_id: u8,
14373    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14374    pub fix_type: u8,
14375    #[doc = "Number of satellites visible."]
14376    pub satellites_visible: u8,
14377    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14378    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14379    pub yaw: u16,
14380}
14381impl GPS_INPUT_DATA {
14382    pub const ENCODED_LEN: usize = 65usize;
14383    pub const DEFAULT: Self = Self {
14384        time_usec: 0_u64,
14385        time_week_ms: 0_u32,
14386        lat: 0_i32,
14387        lon: 0_i32,
14388        alt: 0.0_f32,
14389        hdop: 0.0_f32,
14390        vdop: 0.0_f32,
14391        vn: 0.0_f32,
14392        ve: 0.0_f32,
14393        vd: 0.0_f32,
14394        speed_accuracy: 0.0_f32,
14395        horiz_accuracy: 0.0_f32,
14396        vert_accuracy: 0.0_f32,
14397        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14398        time_week: 0_u16,
14399        gps_id: 0_u8,
14400        fix_type: 0_u8,
14401        satellites_visible: 0_u8,
14402        yaw: 0_u16,
14403    };
14404    #[cfg(feature = "arbitrary")]
14405    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14406        use arbitrary::{Arbitrary, Unstructured};
14407        let mut buf = [0u8; 1024];
14408        rng.fill_bytes(&mut buf);
14409        let mut unstructured = Unstructured::new(&buf);
14410        Self::arbitrary(&mut unstructured).unwrap_or_default()
14411    }
14412}
14413impl Default for GPS_INPUT_DATA {
14414    fn default() -> Self {
14415        Self::DEFAULT.clone()
14416    }
14417}
14418impl MessageData for GPS_INPUT_DATA {
14419    type Message = MavMessage;
14420    const ID: u32 = 232u32;
14421    const NAME: &'static str = "GPS_INPUT";
14422    const EXTRA_CRC: u8 = 151u8;
14423    const ENCODED_LEN: usize = 65usize;
14424    fn deser(
14425        _version: MavlinkVersion,
14426        __input: &[u8],
14427    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14428        let avail_len = __input.len();
14429        let mut payload_buf = [0; Self::ENCODED_LEN];
14430        let mut buf = if avail_len < Self::ENCODED_LEN {
14431            payload_buf[0..avail_len].copy_from_slice(__input);
14432            Bytes::new(&payload_buf)
14433        } else {
14434            Bytes::new(__input)
14435        };
14436        let mut __struct = Self::default();
14437        __struct.time_usec = buf.get_u64_le();
14438        __struct.time_week_ms = buf.get_u32_le();
14439        __struct.lat = buf.get_i32_le();
14440        __struct.lon = buf.get_i32_le();
14441        __struct.alt = buf.get_f32_le();
14442        __struct.hdop = buf.get_f32_le();
14443        __struct.vdop = buf.get_f32_le();
14444        __struct.vn = buf.get_f32_le();
14445        __struct.ve = buf.get_f32_le();
14446        __struct.vd = buf.get_f32_le();
14447        __struct.speed_accuracy = buf.get_f32_le();
14448        __struct.horiz_accuracy = buf.get_f32_le();
14449        __struct.vert_accuracy = buf.get_f32_le();
14450        let tmp = buf.get_u16_le();
14451        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14452            tmp as <GpsInputIgnoreFlags as Flags>::Bits,
14453        )
14454        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14455            flag_type: "GpsInputIgnoreFlags",
14456            value: tmp as u64,
14457        })?;
14458        __struct.time_week = buf.get_u16_le();
14459        __struct.gps_id = buf.get_u8();
14460        __struct.fix_type = buf.get_u8();
14461        __struct.satellites_visible = buf.get_u8();
14462        __struct.yaw = buf.get_u16_le();
14463        Ok(__struct)
14464    }
14465    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14466        let mut __tmp = BytesMut::new(bytes);
14467        #[allow(clippy::absurd_extreme_comparisons)]
14468        #[allow(unused_comparisons)]
14469        if __tmp.remaining() < Self::ENCODED_LEN {
14470            panic!(
14471                "buffer is too small (need {} bytes, but got {})",
14472                Self::ENCODED_LEN,
14473                __tmp.remaining(),
14474            )
14475        }
14476        __tmp.put_u64_le(self.time_usec);
14477        __tmp.put_u32_le(self.time_week_ms);
14478        __tmp.put_i32_le(self.lat);
14479        __tmp.put_i32_le(self.lon);
14480        __tmp.put_f32_le(self.alt);
14481        __tmp.put_f32_le(self.hdop);
14482        __tmp.put_f32_le(self.vdop);
14483        __tmp.put_f32_le(self.vn);
14484        __tmp.put_f32_le(self.ve);
14485        __tmp.put_f32_le(self.vd);
14486        __tmp.put_f32_le(self.speed_accuracy);
14487        __tmp.put_f32_le(self.horiz_accuracy);
14488        __tmp.put_f32_le(self.vert_accuracy);
14489        __tmp.put_u16_le(self.ignore_flags.bits() as u16);
14490        __tmp.put_u16_le(self.time_week);
14491        __tmp.put_u8(self.gps_id);
14492        __tmp.put_u8(self.fix_type);
14493        __tmp.put_u8(self.satellites_visible);
14494        if matches!(version, MavlinkVersion::V2) {
14495            __tmp.put_u16_le(self.yaw);
14496            let len = __tmp.len();
14497            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14498        } else {
14499            __tmp.len()
14500        }
14501    }
14502}
14503#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14504#[doc = ""]
14505#[doc = "ID: 24"]
14506#[derive(Debug, Clone, PartialEq)]
14507#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14508#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14509#[cfg_attr(feature = "ts", derive(TS))]
14510#[cfg_attr(feature = "ts", ts(export))]
14511pub struct GPS_RAW_INT_DATA {
14512    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14513    pub time_usec: u64,
14514    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14515    pub lat: i32,
14516    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14517    pub lon: i32,
14518    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14519    pub alt: i32,
14520    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14521    pub eph: u16,
14522    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14523    pub epv: u16,
14524    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14525    pub vel: u16,
14526    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14527    pub cog: u16,
14528    #[doc = "GPS fix type."]
14529    pub fix_type: GpsFixType,
14530    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14531    pub satellites_visible: u8,
14532    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14533    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14534    pub alt_ellipsoid: i32,
14535    #[doc = "Position uncertainty."]
14536    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14537    pub h_acc: u32,
14538    #[doc = "Altitude uncertainty."]
14539    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14540    pub v_acc: u32,
14541    #[doc = "Speed uncertainty."]
14542    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14543    pub vel_acc: u32,
14544    #[doc = "Heading / track uncertainty"]
14545    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14546    pub hdg_acc: u32,
14547    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14548    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14549    pub yaw: u16,
14550}
14551impl GPS_RAW_INT_DATA {
14552    pub const ENCODED_LEN: usize = 52usize;
14553    pub const DEFAULT: Self = Self {
14554        time_usec: 0_u64,
14555        lat: 0_i32,
14556        lon: 0_i32,
14557        alt: 0_i32,
14558        eph: 0_u16,
14559        epv: 0_u16,
14560        vel: 0_u16,
14561        cog: 0_u16,
14562        fix_type: GpsFixType::DEFAULT,
14563        satellites_visible: 0_u8,
14564        alt_ellipsoid: 0_i32,
14565        h_acc: 0_u32,
14566        v_acc: 0_u32,
14567        vel_acc: 0_u32,
14568        hdg_acc: 0_u32,
14569        yaw: 0_u16,
14570    };
14571    #[cfg(feature = "arbitrary")]
14572    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14573        use arbitrary::{Arbitrary, Unstructured};
14574        let mut buf = [0u8; 1024];
14575        rng.fill_bytes(&mut buf);
14576        let mut unstructured = Unstructured::new(&buf);
14577        Self::arbitrary(&mut unstructured).unwrap_or_default()
14578    }
14579}
14580impl Default for GPS_RAW_INT_DATA {
14581    fn default() -> Self {
14582        Self::DEFAULT.clone()
14583    }
14584}
14585impl MessageData for GPS_RAW_INT_DATA {
14586    type Message = MavMessage;
14587    const ID: u32 = 24u32;
14588    const NAME: &'static str = "GPS_RAW_INT";
14589    const EXTRA_CRC: u8 = 24u8;
14590    const ENCODED_LEN: usize = 52usize;
14591    fn deser(
14592        _version: MavlinkVersion,
14593        __input: &[u8],
14594    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14595        let avail_len = __input.len();
14596        let mut payload_buf = [0; Self::ENCODED_LEN];
14597        let mut buf = if avail_len < Self::ENCODED_LEN {
14598            payload_buf[0..avail_len].copy_from_slice(__input);
14599            Bytes::new(&payload_buf)
14600        } else {
14601            Bytes::new(__input)
14602        };
14603        let mut __struct = Self::default();
14604        __struct.time_usec = buf.get_u64_le();
14605        __struct.lat = buf.get_i32_le();
14606        __struct.lon = buf.get_i32_le();
14607        __struct.alt = buf.get_i32_le();
14608        __struct.eph = buf.get_u16_le();
14609        __struct.epv = buf.get_u16_le();
14610        __struct.vel = buf.get_u16_le();
14611        __struct.cog = buf.get_u16_le();
14612        let tmp = buf.get_u8();
14613        __struct.fix_type =
14614            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14615                enum_type: "GpsFixType",
14616                value: tmp as u64,
14617            })?;
14618        __struct.satellites_visible = buf.get_u8();
14619        __struct.alt_ellipsoid = buf.get_i32_le();
14620        __struct.h_acc = buf.get_u32_le();
14621        __struct.v_acc = buf.get_u32_le();
14622        __struct.vel_acc = buf.get_u32_le();
14623        __struct.hdg_acc = buf.get_u32_le();
14624        __struct.yaw = buf.get_u16_le();
14625        Ok(__struct)
14626    }
14627    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14628        let mut __tmp = BytesMut::new(bytes);
14629        #[allow(clippy::absurd_extreme_comparisons)]
14630        #[allow(unused_comparisons)]
14631        if __tmp.remaining() < Self::ENCODED_LEN {
14632            panic!(
14633                "buffer is too small (need {} bytes, but got {})",
14634                Self::ENCODED_LEN,
14635                __tmp.remaining(),
14636            )
14637        }
14638        __tmp.put_u64_le(self.time_usec);
14639        __tmp.put_i32_le(self.lat);
14640        __tmp.put_i32_le(self.lon);
14641        __tmp.put_i32_le(self.alt);
14642        __tmp.put_u16_le(self.eph);
14643        __tmp.put_u16_le(self.epv);
14644        __tmp.put_u16_le(self.vel);
14645        __tmp.put_u16_le(self.cog);
14646        __tmp.put_u8(self.fix_type as u8);
14647        __tmp.put_u8(self.satellites_visible);
14648        if matches!(version, MavlinkVersion::V2) {
14649            __tmp.put_i32_le(self.alt_ellipsoid);
14650            __tmp.put_u32_le(self.h_acc);
14651            __tmp.put_u32_le(self.v_acc);
14652            __tmp.put_u32_le(self.vel_acc);
14653            __tmp.put_u32_le(self.hdg_acc);
14654            __tmp.put_u16_le(self.yaw);
14655            let len = __tmp.len();
14656            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14657        } else {
14658            __tmp.len()
14659        }
14660    }
14661}
14662#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14663#[doc = ""]
14664#[doc = "ID: 233"]
14665#[derive(Debug, Clone, PartialEq)]
14666#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14667#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14668#[cfg_attr(feature = "ts", derive(TS))]
14669#[cfg_attr(feature = "ts", ts(export))]
14670pub struct GPS_RTCM_DATA_DATA {
14671    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14672    pub flags: u8,
14673    #[doc = "data length"]
14674    pub len: u8,
14675    #[doc = "RTCM message (may be fragmented)"]
14676    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14677    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14678    pub data: [u8; 180],
14679}
14680impl GPS_RTCM_DATA_DATA {
14681    pub const ENCODED_LEN: usize = 182usize;
14682    pub const DEFAULT: Self = Self {
14683        flags: 0_u8,
14684        len: 0_u8,
14685        data: [0_u8; 180usize],
14686    };
14687    #[cfg(feature = "arbitrary")]
14688    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14689        use arbitrary::{Arbitrary, Unstructured};
14690        let mut buf = [0u8; 1024];
14691        rng.fill_bytes(&mut buf);
14692        let mut unstructured = Unstructured::new(&buf);
14693        Self::arbitrary(&mut unstructured).unwrap_or_default()
14694    }
14695}
14696impl Default for GPS_RTCM_DATA_DATA {
14697    fn default() -> Self {
14698        Self::DEFAULT.clone()
14699    }
14700}
14701impl MessageData for GPS_RTCM_DATA_DATA {
14702    type Message = MavMessage;
14703    const ID: u32 = 233u32;
14704    const NAME: &'static str = "GPS_RTCM_DATA";
14705    const EXTRA_CRC: u8 = 35u8;
14706    const ENCODED_LEN: usize = 182usize;
14707    fn deser(
14708        _version: MavlinkVersion,
14709        __input: &[u8],
14710    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14711        let avail_len = __input.len();
14712        let mut payload_buf = [0; Self::ENCODED_LEN];
14713        let mut buf = if avail_len < Self::ENCODED_LEN {
14714            payload_buf[0..avail_len].copy_from_slice(__input);
14715            Bytes::new(&payload_buf)
14716        } else {
14717            Bytes::new(__input)
14718        };
14719        let mut __struct = Self::default();
14720        __struct.flags = buf.get_u8();
14721        __struct.len = buf.get_u8();
14722        for v in &mut __struct.data {
14723            let val = buf.get_u8();
14724            *v = val;
14725        }
14726        Ok(__struct)
14727    }
14728    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14729        let mut __tmp = BytesMut::new(bytes);
14730        #[allow(clippy::absurd_extreme_comparisons)]
14731        #[allow(unused_comparisons)]
14732        if __tmp.remaining() < Self::ENCODED_LEN {
14733            panic!(
14734                "buffer is too small (need {} bytes, but got {})",
14735                Self::ENCODED_LEN,
14736                __tmp.remaining(),
14737            )
14738        }
14739        __tmp.put_u8(self.flags);
14740        __tmp.put_u8(self.len);
14741        for val in &self.data {
14742            __tmp.put_u8(*val);
14743        }
14744        if matches!(version, MavlinkVersion::V2) {
14745            let len = __tmp.len();
14746            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14747        } else {
14748            __tmp.len()
14749        }
14750    }
14751}
14752#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14753#[doc = ""]
14754#[doc = "ID: 127"]
14755#[derive(Debug, Clone, PartialEq)]
14756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14757#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14758#[cfg_attr(feature = "ts", derive(TS))]
14759#[cfg_attr(feature = "ts", ts(export))]
14760pub struct GPS_RTK_DATA {
14761    #[doc = "Time since boot of last baseline message received."]
14762    pub time_last_baseline_ms: u32,
14763    #[doc = "GPS Time of Week of last baseline"]
14764    pub tow: u32,
14765    #[doc = "Current baseline in ECEF x or NED north component."]
14766    pub baseline_a_mm: i32,
14767    #[doc = "Current baseline in ECEF y or NED east component."]
14768    pub baseline_b_mm: i32,
14769    #[doc = "Current baseline in ECEF z or NED down component."]
14770    pub baseline_c_mm: i32,
14771    #[doc = "Current estimate of baseline accuracy."]
14772    pub accuracy: u32,
14773    #[doc = "Current number of integer ambiguity hypotheses."]
14774    pub iar_num_hypotheses: i32,
14775    #[doc = "GPS Week Number of last baseline"]
14776    pub wn: u16,
14777    #[doc = "Identification of connected RTK receiver."]
14778    pub rtk_receiver_id: u8,
14779    #[doc = "GPS-specific health report for RTK data."]
14780    pub rtk_health: u8,
14781    #[doc = "Rate of baseline messages being received by GPS"]
14782    pub rtk_rate: u8,
14783    #[doc = "Current number of sats used for RTK calculation."]
14784    pub nsats: u8,
14785    #[doc = "Coordinate system of baseline"]
14786    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14787}
14788impl GPS_RTK_DATA {
14789    pub const ENCODED_LEN: usize = 35usize;
14790    pub const DEFAULT: Self = Self {
14791        time_last_baseline_ms: 0_u32,
14792        tow: 0_u32,
14793        baseline_a_mm: 0_i32,
14794        baseline_b_mm: 0_i32,
14795        baseline_c_mm: 0_i32,
14796        accuracy: 0_u32,
14797        iar_num_hypotheses: 0_i32,
14798        wn: 0_u16,
14799        rtk_receiver_id: 0_u8,
14800        rtk_health: 0_u8,
14801        rtk_rate: 0_u8,
14802        nsats: 0_u8,
14803        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14804    };
14805    #[cfg(feature = "arbitrary")]
14806    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14807        use arbitrary::{Arbitrary, Unstructured};
14808        let mut buf = [0u8; 1024];
14809        rng.fill_bytes(&mut buf);
14810        let mut unstructured = Unstructured::new(&buf);
14811        Self::arbitrary(&mut unstructured).unwrap_or_default()
14812    }
14813}
14814impl Default for GPS_RTK_DATA {
14815    fn default() -> Self {
14816        Self::DEFAULT.clone()
14817    }
14818}
14819impl MessageData for GPS_RTK_DATA {
14820    type Message = MavMessage;
14821    const ID: u32 = 127u32;
14822    const NAME: &'static str = "GPS_RTK";
14823    const EXTRA_CRC: u8 = 25u8;
14824    const ENCODED_LEN: usize = 35usize;
14825    fn deser(
14826        _version: MavlinkVersion,
14827        __input: &[u8],
14828    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14829        let avail_len = __input.len();
14830        let mut payload_buf = [0; Self::ENCODED_LEN];
14831        let mut buf = if avail_len < Self::ENCODED_LEN {
14832            payload_buf[0..avail_len].copy_from_slice(__input);
14833            Bytes::new(&payload_buf)
14834        } else {
14835            Bytes::new(__input)
14836        };
14837        let mut __struct = Self::default();
14838        __struct.time_last_baseline_ms = buf.get_u32_le();
14839        __struct.tow = buf.get_u32_le();
14840        __struct.baseline_a_mm = buf.get_i32_le();
14841        __struct.baseline_b_mm = buf.get_i32_le();
14842        __struct.baseline_c_mm = buf.get_i32_le();
14843        __struct.accuracy = buf.get_u32_le();
14844        __struct.iar_num_hypotheses = buf.get_i32_le();
14845        __struct.wn = buf.get_u16_le();
14846        __struct.rtk_receiver_id = buf.get_u8();
14847        __struct.rtk_health = buf.get_u8();
14848        __struct.rtk_rate = buf.get_u8();
14849        __struct.nsats = buf.get_u8();
14850        let tmp = buf.get_u8();
14851        __struct.baseline_coords_type =
14852            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14853                enum_type: "RtkBaselineCoordinateSystem",
14854                value: tmp as u64,
14855            })?;
14856        Ok(__struct)
14857    }
14858    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14859        let mut __tmp = BytesMut::new(bytes);
14860        #[allow(clippy::absurd_extreme_comparisons)]
14861        #[allow(unused_comparisons)]
14862        if __tmp.remaining() < Self::ENCODED_LEN {
14863            panic!(
14864                "buffer is too small (need {} bytes, but got {})",
14865                Self::ENCODED_LEN,
14866                __tmp.remaining(),
14867            )
14868        }
14869        __tmp.put_u32_le(self.time_last_baseline_ms);
14870        __tmp.put_u32_le(self.tow);
14871        __tmp.put_i32_le(self.baseline_a_mm);
14872        __tmp.put_i32_le(self.baseline_b_mm);
14873        __tmp.put_i32_le(self.baseline_c_mm);
14874        __tmp.put_u32_le(self.accuracy);
14875        __tmp.put_i32_le(self.iar_num_hypotheses);
14876        __tmp.put_u16_le(self.wn);
14877        __tmp.put_u8(self.rtk_receiver_id);
14878        __tmp.put_u8(self.rtk_health);
14879        __tmp.put_u8(self.rtk_rate);
14880        __tmp.put_u8(self.nsats);
14881        __tmp.put_u8(self.baseline_coords_type as u8);
14882        if matches!(version, MavlinkVersion::V2) {
14883            let len = __tmp.len();
14884            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14885        } else {
14886            __tmp.len()
14887        }
14888    }
14889}
14890#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14891#[doc = ""]
14892#[doc = "ID: 25"]
14893#[derive(Debug, Clone, PartialEq)]
14894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14895#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14896#[cfg_attr(feature = "ts", derive(TS))]
14897#[cfg_attr(feature = "ts", ts(export))]
14898pub struct GPS_STATUS_DATA {
14899    #[doc = "Number of satellites visible"]
14900    pub satellites_visible: u8,
14901    #[doc = "Global satellite ID"]
14902    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14903    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14904    pub satellite_prn: [u8; 20],
14905    #[doc = "0: Satellite not used, 1: used for localization"]
14906    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14907    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14908    pub satellite_used: [u8; 20],
14909    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14910    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14911    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14912    pub satellite_elevation: [u8; 20],
14913    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14914    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14915    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14916    pub satellite_azimuth: [u8; 20],
14917    #[doc = "Signal to noise ratio of satellite"]
14918    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14919    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14920    pub satellite_snr: [u8; 20],
14921}
14922impl GPS_STATUS_DATA {
14923    pub const ENCODED_LEN: usize = 101usize;
14924    pub const DEFAULT: Self = Self {
14925        satellites_visible: 0_u8,
14926        satellite_prn: [0_u8; 20usize],
14927        satellite_used: [0_u8; 20usize],
14928        satellite_elevation: [0_u8; 20usize],
14929        satellite_azimuth: [0_u8; 20usize],
14930        satellite_snr: [0_u8; 20usize],
14931    };
14932    #[cfg(feature = "arbitrary")]
14933    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14934        use arbitrary::{Arbitrary, Unstructured};
14935        let mut buf = [0u8; 1024];
14936        rng.fill_bytes(&mut buf);
14937        let mut unstructured = Unstructured::new(&buf);
14938        Self::arbitrary(&mut unstructured).unwrap_or_default()
14939    }
14940}
14941impl Default for GPS_STATUS_DATA {
14942    fn default() -> Self {
14943        Self::DEFAULT.clone()
14944    }
14945}
14946impl MessageData for GPS_STATUS_DATA {
14947    type Message = MavMessage;
14948    const ID: u32 = 25u32;
14949    const NAME: &'static str = "GPS_STATUS";
14950    const EXTRA_CRC: u8 = 23u8;
14951    const ENCODED_LEN: usize = 101usize;
14952    fn deser(
14953        _version: MavlinkVersion,
14954        __input: &[u8],
14955    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14956        let avail_len = __input.len();
14957        let mut payload_buf = [0; Self::ENCODED_LEN];
14958        let mut buf = if avail_len < Self::ENCODED_LEN {
14959            payload_buf[0..avail_len].copy_from_slice(__input);
14960            Bytes::new(&payload_buf)
14961        } else {
14962            Bytes::new(__input)
14963        };
14964        let mut __struct = Self::default();
14965        __struct.satellites_visible = buf.get_u8();
14966        for v in &mut __struct.satellite_prn {
14967            let val = buf.get_u8();
14968            *v = val;
14969        }
14970        for v in &mut __struct.satellite_used {
14971            let val = buf.get_u8();
14972            *v = val;
14973        }
14974        for v in &mut __struct.satellite_elevation {
14975            let val = buf.get_u8();
14976            *v = val;
14977        }
14978        for v in &mut __struct.satellite_azimuth {
14979            let val = buf.get_u8();
14980            *v = val;
14981        }
14982        for v in &mut __struct.satellite_snr {
14983            let val = buf.get_u8();
14984            *v = val;
14985        }
14986        Ok(__struct)
14987    }
14988    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14989        let mut __tmp = BytesMut::new(bytes);
14990        #[allow(clippy::absurd_extreme_comparisons)]
14991        #[allow(unused_comparisons)]
14992        if __tmp.remaining() < Self::ENCODED_LEN {
14993            panic!(
14994                "buffer is too small (need {} bytes, but got {})",
14995                Self::ENCODED_LEN,
14996                __tmp.remaining(),
14997            )
14998        }
14999        __tmp.put_u8(self.satellites_visible);
15000        for val in &self.satellite_prn {
15001            __tmp.put_u8(*val);
15002        }
15003        for val in &self.satellite_used {
15004            __tmp.put_u8(*val);
15005        }
15006        for val in &self.satellite_elevation {
15007            __tmp.put_u8(*val);
15008        }
15009        for val in &self.satellite_azimuth {
15010            __tmp.put_u8(*val);
15011        }
15012        for val in &self.satellite_snr {
15013            __tmp.put_u8(*val);
15014        }
15015        if matches!(version, MavlinkVersion::V2) {
15016            let len = __tmp.len();
15017            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15018        } else {
15019            __tmp.len()
15020        }
15021    }
15022}
15023#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15024#[doc = ""]
15025#[doc = "ID: 0"]
15026#[derive(Debug, Clone, PartialEq)]
15027#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15028#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15029#[cfg_attr(feature = "ts", derive(TS))]
15030#[cfg_attr(feature = "ts", ts(export))]
15031pub struct HEARTBEAT_DATA {
15032    #[doc = "A bitfield for use for autopilot-specific flags"]
15033    pub custom_mode: u32,
15034    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15035    pub mavtype: MavType,
15036    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15037    pub autopilot: MavAutopilot,
15038    #[doc = "System mode bitmap."]
15039    pub base_mode: MavModeFlag,
15040    #[doc = "System status flag."]
15041    pub system_status: MavState,
15042    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15043    pub mavlink_version: u8,
15044}
15045impl HEARTBEAT_DATA {
15046    pub const ENCODED_LEN: usize = 9usize;
15047    pub const DEFAULT: Self = Self {
15048        custom_mode: 0_u32,
15049        mavtype: MavType::DEFAULT,
15050        autopilot: MavAutopilot::DEFAULT,
15051        base_mode: MavModeFlag::DEFAULT,
15052        system_status: MavState::DEFAULT,
15053        mavlink_version: MINOR_MAVLINK_VERSION,
15054    };
15055    #[cfg(feature = "arbitrary")]
15056    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15057        use arbitrary::{Arbitrary, Unstructured};
15058        let mut buf = [0u8; 1024];
15059        rng.fill_bytes(&mut buf);
15060        let mut unstructured = Unstructured::new(&buf);
15061        Self::arbitrary(&mut unstructured).unwrap_or_default()
15062    }
15063}
15064impl Default for HEARTBEAT_DATA {
15065    fn default() -> Self {
15066        Self::DEFAULT.clone()
15067    }
15068}
15069impl MessageData for HEARTBEAT_DATA {
15070    type Message = MavMessage;
15071    const ID: u32 = 0u32;
15072    const NAME: &'static str = "HEARTBEAT";
15073    const EXTRA_CRC: u8 = 50u8;
15074    const ENCODED_LEN: usize = 9usize;
15075    fn deser(
15076        _version: MavlinkVersion,
15077        __input: &[u8],
15078    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15079        let avail_len = __input.len();
15080        let mut payload_buf = [0; Self::ENCODED_LEN];
15081        let mut buf = if avail_len < Self::ENCODED_LEN {
15082            payload_buf[0..avail_len].copy_from_slice(__input);
15083            Bytes::new(&payload_buf)
15084        } else {
15085            Bytes::new(__input)
15086        };
15087        let mut __struct = Self::default();
15088        __struct.custom_mode = buf.get_u32_le();
15089        let tmp = buf.get_u8();
15090        __struct.mavtype =
15091            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15092                enum_type: "MavType",
15093                value: tmp as u64,
15094            })?;
15095        let tmp = buf.get_u8();
15096        __struct.autopilot =
15097            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15098                enum_type: "MavAutopilot",
15099                value: tmp as u64,
15100            })?;
15101        let tmp = buf.get_u8();
15102        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15103            ::mavlink_core::error::ParserError::InvalidFlag {
15104                flag_type: "MavModeFlag",
15105                value: tmp as u64,
15106            },
15107        )?;
15108        let tmp = buf.get_u8();
15109        __struct.system_status =
15110            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15111                enum_type: "MavState",
15112                value: tmp as u64,
15113            })?;
15114        __struct.mavlink_version = buf.get_u8();
15115        Ok(__struct)
15116    }
15117    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15118        let mut __tmp = BytesMut::new(bytes);
15119        #[allow(clippy::absurd_extreme_comparisons)]
15120        #[allow(unused_comparisons)]
15121        if __tmp.remaining() < Self::ENCODED_LEN {
15122            panic!(
15123                "buffer is too small (need {} bytes, but got {})",
15124                Self::ENCODED_LEN,
15125                __tmp.remaining(),
15126            )
15127        }
15128        __tmp.put_u32_le(self.custom_mode);
15129        __tmp.put_u8(self.mavtype as u8);
15130        __tmp.put_u8(self.autopilot as u8);
15131        __tmp.put_u8(self.base_mode.bits() as u8);
15132        __tmp.put_u8(self.system_status as u8);
15133        __tmp.put_u8(self.mavlink_version);
15134        if matches!(version, MavlinkVersion::V2) {
15135            let len = __tmp.len();
15136            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15137        } else {
15138            __tmp.len()
15139        }
15140    }
15141}
15142#[doc = "The IMU readings in SI units in NED body frame."]
15143#[doc = ""]
15144#[doc = "ID: 105"]
15145#[derive(Debug, Clone, PartialEq)]
15146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15148#[cfg_attr(feature = "ts", derive(TS))]
15149#[cfg_attr(feature = "ts", ts(export))]
15150pub struct HIGHRES_IMU_DATA {
15151    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15152    pub time_usec: u64,
15153    #[doc = "X acceleration"]
15154    pub xacc: f32,
15155    #[doc = "Y acceleration"]
15156    pub yacc: f32,
15157    #[doc = "Z acceleration"]
15158    pub zacc: f32,
15159    #[doc = "Angular speed around X axis"]
15160    pub xgyro: f32,
15161    #[doc = "Angular speed around Y axis"]
15162    pub ygyro: f32,
15163    #[doc = "Angular speed around Z axis"]
15164    pub zgyro: f32,
15165    #[doc = "X Magnetic field"]
15166    pub xmag: f32,
15167    #[doc = "Y Magnetic field"]
15168    pub ymag: f32,
15169    #[doc = "Z Magnetic field"]
15170    pub zmag: f32,
15171    #[doc = "Absolute pressure"]
15172    pub abs_pressure: f32,
15173    #[doc = "Differential pressure"]
15174    pub diff_pressure: f32,
15175    #[doc = "Altitude calculated from pressure"]
15176    pub pressure_alt: f32,
15177    #[doc = "Temperature"]
15178    pub temperature: f32,
15179    #[doc = "Bitmap for fields that have updated since last message"]
15180    pub fields_updated: HighresImuUpdatedFlags,
15181    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15182    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15183    pub id: u8,
15184}
15185impl HIGHRES_IMU_DATA {
15186    pub const ENCODED_LEN: usize = 63usize;
15187    pub const DEFAULT: Self = Self {
15188        time_usec: 0_u64,
15189        xacc: 0.0_f32,
15190        yacc: 0.0_f32,
15191        zacc: 0.0_f32,
15192        xgyro: 0.0_f32,
15193        ygyro: 0.0_f32,
15194        zgyro: 0.0_f32,
15195        xmag: 0.0_f32,
15196        ymag: 0.0_f32,
15197        zmag: 0.0_f32,
15198        abs_pressure: 0.0_f32,
15199        diff_pressure: 0.0_f32,
15200        pressure_alt: 0.0_f32,
15201        temperature: 0.0_f32,
15202        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15203        id: 0_u8,
15204    };
15205    #[cfg(feature = "arbitrary")]
15206    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15207        use arbitrary::{Arbitrary, Unstructured};
15208        let mut buf = [0u8; 1024];
15209        rng.fill_bytes(&mut buf);
15210        let mut unstructured = Unstructured::new(&buf);
15211        Self::arbitrary(&mut unstructured).unwrap_or_default()
15212    }
15213}
15214impl Default for HIGHRES_IMU_DATA {
15215    fn default() -> Self {
15216        Self::DEFAULT.clone()
15217    }
15218}
15219impl MessageData for HIGHRES_IMU_DATA {
15220    type Message = MavMessage;
15221    const ID: u32 = 105u32;
15222    const NAME: &'static str = "HIGHRES_IMU";
15223    const EXTRA_CRC: u8 = 93u8;
15224    const ENCODED_LEN: usize = 63usize;
15225    fn deser(
15226        _version: MavlinkVersion,
15227        __input: &[u8],
15228    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15229        let avail_len = __input.len();
15230        let mut payload_buf = [0; Self::ENCODED_LEN];
15231        let mut buf = if avail_len < Self::ENCODED_LEN {
15232            payload_buf[0..avail_len].copy_from_slice(__input);
15233            Bytes::new(&payload_buf)
15234        } else {
15235            Bytes::new(__input)
15236        };
15237        let mut __struct = Self::default();
15238        __struct.time_usec = buf.get_u64_le();
15239        __struct.xacc = buf.get_f32_le();
15240        __struct.yacc = buf.get_f32_le();
15241        __struct.zacc = buf.get_f32_le();
15242        __struct.xgyro = buf.get_f32_le();
15243        __struct.ygyro = buf.get_f32_le();
15244        __struct.zgyro = buf.get_f32_le();
15245        __struct.xmag = buf.get_f32_le();
15246        __struct.ymag = buf.get_f32_le();
15247        __struct.zmag = buf.get_f32_le();
15248        __struct.abs_pressure = buf.get_f32_le();
15249        __struct.diff_pressure = buf.get_f32_le();
15250        __struct.pressure_alt = buf.get_f32_le();
15251        __struct.temperature = buf.get_f32_le();
15252        let tmp = buf.get_u16_le();
15253        __struct.fields_updated =
15254            HighresImuUpdatedFlags::from_bits(tmp as <HighresImuUpdatedFlags as Flags>::Bits)
15255                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15256                    flag_type: "HighresImuUpdatedFlags",
15257                    value: tmp as u64,
15258                })?;
15259        __struct.id = buf.get_u8();
15260        Ok(__struct)
15261    }
15262    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15263        let mut __tmp = BytesMut::new(bytes);
15264        #[allow(clippy::absurd_extreme_comparisons)]
15265        #[allow(unused_comparisons)]
15266        if __tmp.remaining() < Self::ENCODED_LEN {
15267            panic!(
15268                "buffer is too small (need {} bytes, but got {})",
15269                Self::ENCODED_LEN,
15270                __tmp.remaining(),
15271            )
15272        }
15273        __tmp.put_u64_le(self.time_usec);
15274        __tmp.put_f32_le(self.xacc);
15275        __tmp.put_f32_le(self.yacc);
15276        __tmp.put_f32_le(self.zacc);
15277        __tmp.put_f32_le(self.xgyro);
15278        __tmp.put_f32_le(self.ygyro);
15279        __tmp.put_f32_le(self.zgyro);
15280        __tmp.put_f32_le(self.xmag);
15281        __tmp.put_f32_le(self.ymag);
15282        __tmp.put_f32_le(self.zmag);
15283        __tmp.put_f32_le(self.abs_pressure);
15284        __tmp.put_f32_le(self.diff_pressure);
15285        __tmp.put_f32_le(self.pressure_alt);
15286        __tmp.put_f32_le(self.temperature);
15287        __tmp.put_u16_le(self.fields_updated.bits() as u16);
15288        if matches!(version, MavlinkVersion::V2) {
15289            __tmp.put_u8(self.id);
15290            let len = __tmp.len();
15291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15292        } else {
15293            __tmp.len()
15294        }
15295    }
15296}
15297#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15298#[doc = "Message appropriate for high latency connections like Iridium."]
15299#[doc = ""]
15300#[doc = "ID: 234"]
15301#[derive(Debug, Clone, PartialEq)]
15302#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15303#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15304#[cfg_attr(feature = "ts", derive(TS))]
15305#[cfg_attr(feature = "ts", ts(export))]
15306pub struct HIGH_LATENCY_DATA {
15307    #[doc = "A bitfield for use for autopilot-specific flags."]
15308    pub custom_mode: u32,
15309    #[doc = "Latitude"]
15310    pub latitude: i32,
15311    #[doc = "Longitude"]
15312    pub longitude: i32,
15313    #[doc = "roll"]
15314    pub roll: i16,
15315    #[doc = "pitch"]
15316    pub pitch: i16,
15317    #[doc = "heading"]
15318    pub heading: u16,
15319    #[doc = "heading setpoint"]
15320    pub heading_sp: i16,
15321    #[doc = "Altitude above mean sea level"]
15322    pub altitude_amsl: i16,
15323    #[doc = "Altitude setpoint relative to the home position"]
15324    pub altitude_sp: i16,
15325    #[doc = "distance to target"]
15326    pub wp_distance: u16,
15327    #[doc = "Bitmap of enabled system modes."]
15328    pub base_mode: MavModeFlag,
15329    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15330    pub landed_state: MavLandedState,
15331    #[doc = "throttle (percentage)"]
15332    pub throttle: i8,
15333    #[doc = "airspeed"]
15334    pub airspeed: u8,
15335    #[doc = "airspeed setpoint"]
15336    pub airspeed_sp: u8,
15337    #[doc = "groundspeed"]
15338    pub groundspeed: u8,
15339    #[doc = "climb rate"]
15340    pub climb_rate: i8,
15341    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15342    pub gps_nsat: u8,
15343    #[doc = "GPS Fix type."]
15344    pub gps_fix_type: GpsFixType,
15345    #[doc = "Remaining battery (percentage)"]
15346    pub battery_remaining: u8,
15347    #[doc = "Autopilot temperature (degrees C)"]
15348    pub temperature: i8,
15349    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15350    pub temperature_air: i8,
15351    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15352    pub failsafe: u8,
15353    #[doc = "current waypoint number"]
15354    pub wp_num: u8,
15355}
15356impl HIGH_LATENCY_DATA {
15357    pub const ENCODED_LEN: usize = 40usize;
15358    pub const DEFAULT: Self = Self {
15359        custom_mode: 0_u32,
15360        latitude: 0_i32,
15361        longitude: 0_i32,
15362        roll: 0_i16,
15363        pitch: 0_i16,
15364        heading: 0_u16,
15365        heading_sp: 0_i16,
15366        altitude_amsl: 0_i16,
15367        altitude_sp: 0_i16,
15368        wp_distance: 0_u16,
15369        base_mode: MavModeFlag::DEFAULT,
15370        landed_state: MavLandedState::DEFAULT,
15371        throttle: 0_i8,
15372        airspeed: 0_u8,
15373        airspeed_sp: 0_u8,
15374        groundspeed: 0_u8,
15375        climb_rate: 0_i8,
15376        gps_nsat: 0_u8,
15377        gps_fix_type: GpsFixType::DEFAULT,
15378        battery_remaining: 0_u8,
15379        temperature: 0_i8,
15380        temperature_air: 0_i8,
15381        failsafe: 0_u8,
15382        wp_num: 0_u8,
15383    };
15384    #[cfg(feature = "arbitrary")]
15385    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15386        use arbitrary::{Arbitrary, Unstructured};
15387        let mut buf = [0u8; 1024];
15388        rng.fill_bytes(&mut buf);
15389        let mut unstructured = Unstructured::new(&buf);
15390        Self::arbitrary(&mut unstructured).unwrap_or_default()
15391    }
15392}
15393impl Default for HIGH_LATENCY_DATA {
15394    fn default() -> Self {
15395        Self::DEFAULT.clone()
15396    }
15397}
15398impl MessageData for HIGH_LATENCY_DATA {
15399    type Message = MavMessage;
15400    const ID: u32 = 234u32;
15401    const NAME: &'static str = "HIGH_LATENCY";
15402    const EXTRA_CRC: u8 = 150u8;
15403    const ENCODED_LEN: usize = 40usize;
15404    fn deser(
15405        _version: MavlinkVersion,
15406        __input: &[u8],
15407    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15408        let avail_len = __input.len();
15409        let mut payload_buf = [0; Self::ENCODED_LEN];
15410        let mut buf = if avail_len < Self::ENCODED_LEN {
15411            payload_buf[0..avail_len].copy_from_slice(__input);
15412            Bytes::new(&payload_buf)
15413        } else {
15414            Bytes::new(__input)
15415        };
15416        let mut __struct = Self::default();
15417        __struct.custom_mode = buf.get_u32_le();
15418        __struct.latitude = buf.get_i32_le();
15419        __struct.longitude = buf.get_i32_le();
15420        __struct.roll = buf.get_i16_le();
15421        __struct.pitch = buf.get_i16_le();
15422        __struct.heading = buf.get_u16_le();
15423        __struct.heading_sp = buf.get_i16_le();
15424        __struct.altitude_amsl = buf.get_i16_le();
15425        __struct.altitude_sp = buf.get_i16_le();
15426        __struct.wp_distance = buf.get_u16_le();
15427        let tmp = buf.get_u8();
15428        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15429            ::mavlink_core::error::ParserError::InvalidFlag {
15430                flag_type: "MavModeFlag",
15431                value: tmp as u64,
15432            },
15433        )?;
15434        let tmp = buf.get_u8();
15435        __struct.landed_state =
15436            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15437                enum_type: "MavLandedState",
15438                value: tmp as u64,
15439            })?;
15440        __struct.throttle = buf.get_i8();
15441        __struct.airspeed = buf.get_u8();
15442        __struct.airspeed_sp = buf.get_u8();
15443        __struct.groundspeed = buf.get_u8();
15444        __struct.climb_rate = buf.get_i8();
15445        __struct.gps_nsat = buf.get_u8();
15446        let tmp = buf.get_u8();
15447        __struct.gps_fix_type =
15448            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15449                enum_type: "GpsFixType",
15450                value: tmp as u64,
15451            })?;
15452        __struct.battery_remaining = buf.get_u8();
15453        __struct.temperature = buf.get_i8();
15454        __struct.temperature_air = buf.get_i8();
15455        __struct.failsafe = buf.get_u8();
15456        __struct.wp_num = buf.get_u8();
15457        Ok(__struct)
15458    }
15459    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15460        let mut __tmp = BytesMut::new(bytes);
15461        #[allow(clippy::absurd_extreme_comparisons)]
15462        #[allow(unused_comparisons)]
15463        if __tmp.remaining() < Self::ENCODED_LEN {
15464            panic!(
15465                "buffer is too small (need {} bytes, but got {})",
15466                Self::ENCODED_LEN,
15467                __tmp.remaining(),
15468            )
15469        }
15470        __tmp.put_u32_le(self.custom_mode);
15471        __tmp.put_i32_le(self.latitude);
15472        __tmp.put_i32_le(self.longitude);
15473        __tmp.put_i16_le(self.roll);
15474        __tmp.put_i16_le(self.pitch);
15475        __tmp.put_u16_le(self.heading);
15476        __tmp.put_i16_le(self.heading_sp);
15477        __tmp.put_i16_le(self.altitude_amsl);
15478        __tmp.put_i16_le(self.altitude_sp);
15479        __tmp.put_u16_le(self.wp_distance);
15480        __tmp.put_u8(self.base_mode.bits() as u8);
15481        __tmp.put_u8(self.landed_state as u8);
15482        __tmp.put_i8(self.throttle);
15483        __tmp.put_u8(self.airspeed);
15484        __tmp.put_u8(self.airspeed_sp);
15485        __tmp.put_u8(self.groundspeed);
15486        __tmp.put_i8(self.climb_rate);
15487        __tmp.put_u8(self.gps_nsat);
15488        __tmp.put_u8(self.gps_fix_type as u8);
15489        __tmp.put_u8(self.battery_remaining);
15490        __tmp.put_i8(self.temperature);
15491        __tmp.put_i8(self.temperature_air);
15492        __tmp.put_u8(self.failsafe);
15493        __tmp.put_u8(self.wp_num);
15494        if matches!(version, MavlinkVersion::V2) {
15495            let len = __tmp.len();
15496            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15497        } else {
15498            __tmp.len()
15499        }
15500    }
15501}
15502#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15503#[doc = ""]
15504#[doc = "ID: 235"]
15505#[derive(Debug, Clone, PartialEq)]
15506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15508#[cfg_attr(feature = "ts", derive(TS))]
15509#[cfg_attr(feature = "ts", ts(export))]
15510pub struct HIGH_LATENCY2_DATA {
15511    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15512    pub timestamp: u32,
15513    #[doc = "Latitude"]
15514    pub latitude: i32,
15515    #[doc = "Longitude"]
15516    pub longitude: i32,
15517    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15518    pub custom_mode: u16,
15519    #[doc = "Altitude above mean sea level"]
15520    pub altitude: i16,
15521    #[doc = "Altitude setpoint"]
15522    pub target_altitude: i16,
15523    #[doc = "Distance to target waypoint or position"]
15524    pub target_distance: u16,
15525    #[doc = "Current waypoint number"]
15526    pub wp_num: u16,
15527    #[doc = "Bitmap of failure flags."]
15528    pub failure_flags: HlFailureFlag,
15529    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15530    pub mavtype: MavType,
15531    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15532    pub autopilot: MavAutopilot,
15533    #[doc = "Heading"]
15534    pub heading: u8,
15535    #[doc = "Heading setpoint"]
15536    pub target_heading: u8,
15537    #[doc = "Throttle"]
15538    pub throttle: u8,
15539    #[doc = "Airspeed"]
15540    pub airspeed: u8,
15541    #[doc = "Airspeed setpoint"]
15542    pub airspeed_sp: u8,
15543    #[doc = "Groundspeed"]
15544    pub groundspeed: u8,
15545    #[doc = "Windspeed"]
15546    pub windspeed: u8,
15547    #[doc = "Wind heading"]
15548    pub wind_heading: u8,
15549    #[doc = "Maximum error horizontal position since last message"]
15550    pub eph: u8,
15551    #[doc = "Maximum error vertical position since last message"]
15552    pub epv: u8,
15553    #[doc = "Air temperature"]
15554    pub temperature_air: i8,
15555    #[doc = "Maximum climb rate magnitude since last message"]
15556    pub climb_rate: i8,
15557    #[doc = "Battery level (-1 if field not provided)."]
15558    pub battery: i8,
15559    #[doc = "Field for custom payload."]
15560    pub custom0: i8,
15561    #[doc = "Field for custom payload."]
15562    pub custom1: i8,
15563    #[doc = "Field for custom payload."]
15564    pub custom2: i8,
15565}
15566impl HIGH_LATENCY2_DATA {
15567    pub const ENCODED_LEN: usize = 42usize;
15568    pub const DEFAULT: Self = Self {
15569        timestamp: 0_u32,
15570        latitude: 0_i32,
15571        longitude: 0_i32,
15572        custom_mode: 0_u16,
15573        altitude: 0_i16,
15574        target_altitude: 0_i16,
15575        target_distance: 0_u16,
15576        wp_num: 0_u16,
15577        failure_flags: HlFailureFlag::DEFAULT,
15578        mavtype: MavType::DEFAULT,
15579        autopilot: MavAutopilot::DEFAULT,
15580        heading: 0_u8,
15581        target_heading: 0_u8,
15582        throttle: 0_u8,
15583        airspeed: 0_u8,
15584        airspeed_sp: 0_u8,
15585        groundspeed: 0_u8,
15586        windspeed: 0_u8,
15587        wind_heading: 0_u8,
15588        eph: 0_u8,
15589        epv: 0_u8,
15590        temperature_air: 0_i8,
15591        climb_rate: 0_i8,
15592        battery: 0_i8,
15593        custom0: 0_i8,
15594        custom1: 0_i8,
15595        custom2: 0_i8,
15596    };
15597    #[cfg(feature = "arbitrary")]
15598    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15599        use arbitrary::{Arbitrary, Unstructured};
15600        let mut buf = [0u8; 1024];
15601        rng.fill_bytes(&mut buf);
15602        let mut unstructured = Unstructured::new(&buf);
15603        Self::arbitrary(&mut unstructured).unwrap_or_default()
15604    }
15605}
15606impl Default for HIGH_LATENCY2_DATA {
15607    fn default() -> Self {
15608        Self::DEFAULT.clone()
15609    }
15610}
15611impl MessageData for HIGH_LATENCY2_DATA {
15612    type Message = MavMessage;
15613    const ID: u32 = 235u32;
15614    const NAME: &'static str = "HIGH_LATENCY2";
15615    const EXTRA_CRC: u8 = 179u8;
15616    const ENCODED_LEN: usize = 42usize;
15617    fn deser(
15618        _version: MavlinkVersion,
15619        __input: &[u8],
15620    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15621        let avail_len = __input.len();
15622        let mut payload_buf = [0; Self::ENCODED_LEN];
15623        let mut buf = if avail_len < Self::ENCODED_LEN {
15624            payload_buf[0..avail_len].copy_from_slice(__input);
15625            Bytes::new(&payload_buf)
15626        } else {
15627            Bytes::new(__input)
15628        };
15629        let mut __struct = Self::default();
15630        __struct.timestamp = buf.get_u32_le();
15631        __struct.latitude = buf.get_i32_le();
15632        __struct.longitude = buf.get_i32_le();
15633        __struct.custom_mode = buf.get_u16_le();
15634        __struct.altitude = buf.get_i16_le();
15635        __struct.target_altitude = buf.get_i16_le();
15636        __struct.target_distance = buf.get_u16_le();
15637        __struct.wp_num = buf.get_u16_le();
15638        let tmp = buf.get_u16_le();
15639        __struct.failure_flags = HlFailureFlag::from_bits(tmp as <HlFailureFlag as Flags>::Bits)
15640            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15641                flag_type: "HlFailureFlag",
15642                value: tmp as u64,
15643            })?;
15644        let tmp = buf.get_u8();
15645        __struct.mavtype =
15646            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15647                enum_type: "MavType",
15648                value: tmp as u64,
15649            })?;
15650        let tmp = buf.get_u8();
15651        __struct.autopilot =
15652            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15653                enum_type: "MavAutopilot",
15654                value: tmp as u64,
15655            })?;
15656        __struct.heading = buf.get_u8();
15657        __struct.target_heading = buf.get_u8();
15658        __struct.throttle = buf.get_u8();
15659        __struct.airspeed = buf.get_u8();
15660        __struct.airspeed_sp = buf.get_u8();
15661        __struct.groundspeed = buf.get_u8();
15662        __struct.windspeed = buf.get_u8();
15663        __struct.wind_heading = buf.get_u8();
15664        __struct.eph = buf.get_u8();
15665        __struct.epv = buf.get_u8();
15666        __struct.temperature_air = buf.get_i8();
15667        __struct.climb_rate = buf.get_i8();
15668        __struct.battery = buf.get_i8();
15669        __struct.custom0 = buf.get_i8();
15670        __struct.custom1 = buf.get_i8();
15671        __struct.custom2 = buf.get_i8();
15672        Ok(__struct)
15673    }
15674    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15675        let mut __tmp = BytesMut::new(bytes);
15676        #[allow(clippy::absurd_extreme_comparisons)]
15677        #[allow(unused_comparisons)]
15678        if __tmp.remaining() < Self::ENCODED_LEN {
15679            panic!(
15680                "buffer is too small (need {} bytes, but got {})",
15681                Self::ENCODED_LEN,
15682                __tmp.remaining(),
15683            )
15684        }
15685        __tmp.put_u32_le(self.timestamp);
15686        __tmp.put_i32_le(self.latitude);
15687        __tmp.put_i32_le(self.longitude);
15688        __tmp.put_u16_le(self.custom_mode);
15689        __tmp.put_i16_le(self.altitude);
15690        __tmp.put_i16_le(self.target_altitude);
15691        __tmp.put_u16_le(self.target_distance);
15692        __tmp.put_u16_le(self.wp_num);
15693        __tmp.put_u16_le(self.failure_flags.bits() as u16);
15694        __tmp.put_u8(self.mavtype as u8);
15695        __tmp.put_u8(self.autopilot as u8);
15696        __tmp.put_u8(self.heading);
15697        __tmp.put_u8(self.target_heading);
15698        __tmp.put_u8(self.throttle);
15699        __tmp.put_u8(self.airspeed);
15700        __tmp.put_u8(self.airspeed_sp);
15701        __tmp.put_u8(self.groundspeed);
15702        __tmp.put_u8(self.windspeed);
15703        __tmp.put_u8(self.wind_heading);
15704        __tmp.put_u8(self.eph);
15705        __tmp.put_u8(self.epv);
15706        __tmp.put_i8(self.temperature_air);
15707        __tmp.put_i8(self.climb_rate);
15708        __tmp.put_i8(self.battery);
15709        __tmp.put_i8(self.custom0);
15710        __tmp.put_i8(self.custom1);
15711        __tmp.put_i8(self.custom2);
15712        if matches!(version, MavlinkVersion::V2) {
15713            let len = __tmp.len();
15714            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15715        } else {
15716            __tmp.len()
15717        }
15718    }
15719}
15720#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15721#[doc = ""]
15722#[doc = "ID: 93"]
15723#[derive(Debug, Clone, PartialEq)]
15724#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15725#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15726#[cfg_attr(feature = "ts", derive(TS))]
15727#[cfg_attr(feature = "ts", ts(export))]
15728pub struct HIL_ACTUATOR_CONTROLS_DATA {
15729    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15730    pub time_usec: u64,
15731    #[doc = "Flags bitmask."]
15732    pub flags: HilActuatorControlsFlags,
15733    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15734    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15735    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15736    pub controls: [f32; 16],
15737    #[doc = "System mode. Includes arming state."]
15738    pub mode: MavModeFlag,
15739}
15740impl HIL_ACTUATOR_CONTROLS_DATA {
15741    pub const ENCODED_LEN: usize = 81usize;
15742    pub const DEFAULT: Self = Self {
15743        time_usec: 0_u64,
15744        flags: HilActuatorControlsFlags::DEFAULT,
15745        controls: [0.0_f32; 16usize],
15746        mode: MavModeFlag::DEFAULT,
15747    };
15748    #[cfg(feature = "arbitrary")]
15749    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15750        use arbitrary::{Arbitrary, Unstructured};
15751        let mut buf = [0u8; 1024];
15752        rng.fill_bytes(&mut buf);
15753        let mut unstructured = Unstructured::new(&buf);
15754        Self::arbitrary(&mut unstructured).unwrap_or_default()
15755    }
15756}
15757impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15758    fn default() -> Self {
15759        Self::DEFAULT.clone()
15760    }
15761}
15762impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15763    type Message = MavMessage;
15764    const ID: u32 = 93u32;
15765    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15766    const EXTRA_CRC: u8 = 47u8;
15767    const ENCODED_LEN: usize = 81usize;
15768    fn deser(
15769        _version: MavlinkVersion,
15770        __input: &[u8],
15771    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15772        let avail_len = __input.len();
15773        let mut payload_buf = [0; Self::ENCODED_LEN];
15774        let mut buf = if avail_len < Self::ENCODED_LEN {
15775            payload_buf[0..avail_len].copy_from_slice(__input);
15776            Bytes::new(&payload_buf)
15777        } else {
15778            Bytes::new(__input)
15779        };
15780        let mut __struct = Self::default();
15781        __struct.time_usec = buf.get_u64_le();
15782        let tmp = buf.get_u64_le();
15783        __struct.flags =
15784            HilActuatorControlsFlags::from_bits(tmp as <HilActuatorControlsFlags as Flags>::Bits)
15785                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15786                flag_type: "HilActuatorControlsFlags",
15787                value: tmp as u64,
15788            })?;
15789        for v in &mut __struct.controls {
15790            let val = buf.get_f32_le();
15791            *v = val;
15792        }
15793        let tmp = buf.get_u8();
15794        __struct.mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15795            ::mavlink_core::error::ParserError::InvalidFlag {
15796                flag_type: "MavModeFlag",
15797                value: tmp as u64,
15798            },
15799        )?;
15800        Ok(__struct)
15801    }
15802    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15803        let mut __tmp = BytesMut::new(bytes);
15804        #[allow(clippy::absurd_extreme_comparisons)]
15805        #[allow(unused_comparisons)]
15806        if __tmp.remaining() < Self::ENCODED_LEN {
15807            panic!(
15808                "buffer is too small (need {} bytes, but got {})",
15809                Self::ENCODED_LEN,
15810                __tmp.remaining(),
15811            )
15812        }
15813        __tmp.put_u64_le(self.time_usec);
15814        __tmp.put_u64_le(self.flags.bits() as u64);
15815        for val in &self.controls {
15816            __tmp.put_f32_le(*val);
15817        }
15818        __tmp.put_u8(self.mode.bits() as u8);
15819        if matches!(version, MavlinkVersion::V2) {
15820            let len = __tmp.len();
15821            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15822        } else {
15823            __tmp.len()
15824        }
15825    }
15826}
15827#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15828#[doc = ""]
15829#[doc = "ID: 91"]
15830#[derive(Debug, Clone, PartialEq)]
15831#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15833#[cfg_attr(feature = "ts", derive(TS))]
15834#[cfg_attr(feature = "ts", ts(export))]
15835pub struct HIL_CONTROLS_DATA {
15836    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15837    pub time_usec: u64,
15838    #[doc = "Control output -1 .. 1"]
15839    pub roll_ailerons: f32,
15840    #[doc = "Control output -1 .. 1"]
15841    pub pitch_elevator: f32,
15842    #[doc = "Control output -1 .. 1"]
15843    pub yaw_rudder: f32,
15844    #[doc = "Throttle 0 .. 1"]
15845    pub throttle: f32,
15846    #[doc = "Aux 1, -1 .. 1"]
15847    pub aux1: f32,
15848    #[doc = "Aux 2, -1 .. 1"]
15849    pub aux2: f32,
15850    #[doc = "Aux 3, -1 .. 1"]
15851    pub aux3: f32,
15852    #[doc = "Aux 4, -1 .. 1"]
15853    pub aux4: f32,
15854    #[doc = "System mode."]
15855    pub mode: MavMode,
15856    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15857    pub nav_mode: u8,
15858}
15859impl HIL_CONTROLS_DATA {
15860    pub const ENCODED_LEN: usize = 42usize;
15861    pub const DEFAULT: Self = Self {
15862        time_usec: 0_u64,
15863        roll_ailerons: 0.0_f32,
15864        pitch_elevator: 0.0_f32,
15865        yaw_rudder: 0.0_f32,
15866        throttle: 0.0_f32,
15867        aux1: 0.0_f32,
15868        aux2: 0.0_f32,
15869        aux3: 0.0_f32,
15870        aux4: 0.0_f32,
15871        mode: MavMode::DEFAULT,
15872        nav_mode: 0_u8,
15873    };
15874    #[cfg(feature = "arbitrary")]
15875    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15876        use arbitrary::{Arbitrary, Unstructured};
15877        let mut buf = [0u8; 1024];
15878        rng.fill_bytes(&mut buf);
15879        let mut unstructured = Unstructured::new(&buf);
15880        Self::arbitrary(&mut unstructured).unwrap_or_default()
15881    }
15882}
15883impl Default for HIL_CONTROLS_DATA {
15884    fn default() -> Self {
15885        Self::DEFAULT.clone()
15886    }
15887}
15888impl MessageData for HIL_CONTROLS_DATA {
15889    type Message = MavMessage;
15890    const ID: u32 = 91u32;
15891    const NAME: &'static str = "HIL_CONTROLS";
15892    const EXTRA_CRC: u8 = 63u8;
15893    const ENCODED_LEN: usize = 42usize;
15894    fn deser(
15895        _version: MavlinkVersion,
15896        __input: &[u8],
15897    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15898        let avail_len = __input.len();
15899        let mut payload_buf = [0; Self::ENCODED_LEN];
15900        let mut buf = if avail_len < Self::ENCODED_LEN {
15901            payload_buf[0..avail_len].copy_from_slice(__input);
15902            Bytes::new(&payload_buf)
15903        } else {
15904            Bytes::new(__input)
15905        };
15906        let mut __struct = Self::default();
15907        __struct.time_usec = buf.get_u64_le();
15908        __struct.roll_ailerons = buf.get_f32_le();
15909        __struct.pitch_elevator = buf.get_f32_le();
15910        __struct.yaw_rudder = buf.get_f32_le();
15911        __struct.throttle = buf.get_f32_le();
15912        __struct.aux1 = buf.get_f32_le();
15913        __struct.aux2 = buf.get_f32_le();
15914        __struct.aux3 = buf.get_f32_le();
15915        __struct.aux4 = buf.get_f32_le();
15916        let tmp = buf.get_u8();
15917        __struct.mode =
15918            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15919                enum_type: "MavMode",
15920                value: tmp as u64,
15921            })?;
15922        __struct.nav_mode = buf.get_u8();
15923        Ok(__struct)
15924    }
15925    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15926        let mut __tmp = BytesMut::new(bytes);
15927        #[allow(clippy::absurd_extreme_comparisons)]
15928        #[allow(unused_comparisons)]
15929        if __tmp.remaining() < Self::ENCODED_LEN {
15930            panic!(
15931                "buffer is too small (need {} bytes, but got {})",
15932                Self::ENCODED_LEN,
15933                __tmp.remaining(),
15934            )
15935        }
15936        __tmp.put_u64_le(self.time_usec);
15937        __tmp.put_f32_le(self.roll_ailerons);
15938        __tmp.put_f32_le(self.pitch_elevator);
15939        __tmp.put_f32_le(self.yaw_rudder);
15940        __tmp.put_f32_le(self.throttle);
15941        __tmp.put_f32_le(self.aux1);
15942        __tmp.put_f32_le(self.aux2);
15943        __tmp.put_f32_le(self.aux3);
15944        __tmp.put_f32_le(self.aux4);
15945        __tmp.put_u8(self.mode as u8);
15946        __tmp.put_u8(self.nav_mode);
15947        if matches!(version, MavlinkVersion::V2) {
15948            let len = __tmp.len();
15949            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15950        } else {
15951            __tmp.len()
15952        }
15953    }
15954}
15955#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15956#[doc = ""]
15957#[doc = "ID: 113"]
15958#[derive(Debug, Clone, PartialEq)]
15959#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15960#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15961#[cfg_attr(feature = "ts", derive(TS))]
15962#[cfg_attr(feature = "ts", ts(export))]
15963pub struct HIL_GPS_DATA {
15964    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15965    pub time_usec: u64,
15966    #[doc = "Latitude (WGS84)"]
15967    pub lat: i32,
15968    #[doc = "Longitude (WGS84)"]
15969    pub lon: i32,
15970    #[doc = "Altitude (MSL). Positive for up."]
15971    pub alt: i32,
15972    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15973    pub eph: u16,
15974    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15975    pub epv: u16,
15976    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15977    pub vel: u16,
15978    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15979    pub vn: i16,
15980    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15981    pub ve: i16,
15982    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15983    pub vd: i16,
15984    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15985    pub cog: u16,
15986    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
15987    pub fix_type: u8,
15988    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15989    pub satellites_visible: u8,
15990    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
15991    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15992    pub id: u8,
15993    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15994    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15995    pub yaw: u16,
15996}
15997impl HIL_GPS_DATA {
15998    pub const ENCODED_LEN: usize = 39usize;
15999    pub const DEFAULT: Self = Self {
16000        time_usec: 0_u64,
16001        lat: 0_i32,
16002        lon: 0_i32,
16003        alt: 0_i32,
16004        eph: 0_u16,
16005        epv: 0_u16,
16006        vel: 0_u16,
16007        vn: 0_i16,
16008        ve: 0_i16,
16009        vd: 0_i16,
16010        cog: 0_u16,
16011        fix_type: 0_u8,
16012        satellites_visible: 0_u8,
16013        id: 0_u8,
16014        yaw: 0_u16,
16015    };
16016    #[cfg(feature = "arbitrary")]
16017    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16018        use arbitrary::{Arbitrary, Unstructured};
16019        let mut buf = [0u8; 1024];
16020        rng.fill_bytes(&mut buf);
16021        let mut unstructured = Unstructured::new(&buf);
16022        Self::arbitrary(&mut unstructured).unwrap_or_default()
16023    }
16024}
16025impl Default for HIL_GPS_DATA {
16026    fn default() -> Self {
16027        Self::DEFAULT.clone()
16028    }
16029}
16030impl MessageData for HIL_GPS_DATA {
16031    type Message = MavMessage;
16032    const ID: u32 = 113u32;
16033    const NAME: &'static str = "HIL_GPS";
16034    const EXTRA_CRC: u8 = 124u8;
16035    const ENCODED_LEN: usize = 39usize;
16036    fn deser(
16037        _version: MavlinkVersion,
16038        __input: &[u8],
16039    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16040        let avail_len = __input.len();
16041        let mut payload_buf = [0; Self::ENCODED_LEN];
16042        let mut buf = if avail_len < Self::ENCODED_LEN {
16043            payload_buf[0..avail_len].copy_from_slice(__input);
16044            Bytes::new(&payload_buf)
16045        } else {
16046            Bytes::new(__input)
16047        };
16048        let mut __struct = Self::default();
16049        __struct.time_usec = buf.get_u64_le();
16050        __struct.lat = buf.get_i32_le();
16051        __struct.lon = buf.get_i32_le();
16052        __struct.alt = buf.get_i32_le();
16053        __struct.eph = buf.get_u16_le();
16054        __struct.epv = buf.get_u16_le();
16055        __struct.vel = buf.get_u16_le();
16056        __struct.vn = buf.get_i16_le();
16057        __struct.ve = buf.get_i16_le();
16058        __struct.vd = buf.get_i16_le();
16059        __struct.cog = buf.get_u16_le();
16060        __struct.fix_type = buf.get_u8();
16061        __struct.satellites_visible = buf.get_u8();
16062        __struct.id = buf.get_u8();
16063        __struct.yaw = buf.get_u16_le();
16064        Ok(__struct)
16065    }
16066    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16067        let mut __tmp = BytesMut::new(bytes);
16068        #[allow(clippy::absurd_extreme_comparisons)]
16069        #[allow(unused_comparisons)]
16070        if __tmp.remaining() < Self::ENCODED_LEN {
16071            panic!(
16072                "buffer is too small (need {} bytes, but got {})",
16073                Self::ENCODED_LEN,
16074                __tmp.remaining(),
16075            )
16076        }
16077        __tmp.put_u64_le(self.time_usec);
16078        __tmp.put_i32_le(self.lat);
16079        __tmp.put_i32_le(self.lon);
16080        __tmp.put_i32_le(self.alt);
16081        __tmp.put_u16_le(self.eph);
16082        __tmp.put_u16_le(self.epv);
16083        __tmp.put_u16_le(self.vel);
16084        __tmp.put_i16_le(self.vn);
16085        __tmp.put_i16_le(self.ve);
16086        __tmp.put_i16_le(self.vd);
16087        __tmp.put_u16_le(self.cog);
16088        __tmp.put_u8(self.fix_type);
16089        __tmp.put_u8(self.satellites_visible);
16090        if matches!(version, MavlinkVersion::V2) {
16091            __tmp.put_u8(self.id);
16092            __tmp.put_u16_le(self.yaw);
16093            let len = __tmp.len();
16094            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16095        } else {
16096            __tmp.len()
16097        }
16098    }
16099}
16100#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16101#[doc = ""]
16102#[doc = "ID: 114"]
16103#[derive(Debug, Clone, PartialEq)]
16104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16105#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16106#[cfg_attr(feature = "ts", derive(TS))]
16107#[cfg_attr(feature = "ts", ts(export))]
16108pub struct HIL_OPTICAL_FLOW_DATA {
16109    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16110    pub time_usec: u64,
16111    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16112    pub integration_time_us: u32,
16113    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16114    pub integrated_x: f32,
16115    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16116    pub integrated_y: f32,
16117    #[doc = "RH rotation around X axis"]
16118    pub integrated_xgyro: f32,
16119    #[doc = "RH rotation around Y axis"]
16120    pub integrated_ygyro: f32,
16121    #[doc = "RH rotation around Z axis"]
16122    pub integrated_zgyro: f32,
16123    #[doc = "Time since the distance was sampled."]
16124    pub time_delta_distance_us: u32,
16125    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16126    pub distance: f32,
16127    #[doc = "Temperature"]
16128    pub temperature: i16,
16129    #[doc = "Sensor ID"]
16130    pub sensor_id: u8,
16131    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16132    pub quality: u8,
16133}
16134impl HIL_OPTICAL_FLOW_DATA {
16135    pub const ENCODED_LEN: usize = 44usize;
16136    pub const DEFAULT: Self = Self {
16137        time_usec: 0_u64,
16138        integration_time_us: 0_u32,
16139        integrated_x: 0.0_f32,
16140        integrated_y: 0.0_f32,
16141        integrated_xgyro: 0.0_f32,
16142        integrated_ygyro: 0.0_f32,
16143        integrated_zgyro: 0.0_f32,
16144        time_delta_distance_us: 0_u32,
16145        distance: 0.0_f32,
16146        temperature: 0_i16,
16147        sensor_id: 0_u8,
16148        quality: 0_u8,
16149    };
16150    #[cfg(feature = "arbitrary")]
16151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16152        use arbitrary::{Arbitrary, Unstructured};
16153        let mut buf = [0u8; 1024];
16154        rng.fill_bytes(&mut buf);
16155        let mut unstructured = Unstructured::new(&buf);
16156        Self::arbitrary(&mut unstructured).unwrap_or_default()
16157    }
16158}
16159impl Default for HIL_OPTICAL_FLOW_DATA {
16160    fn default() -> Self {
16161        Self::DEFAULT.clone()
16162    }
16163}
16164impl MessageData for HIL_OPTICAL_FLOW_DATA {
16165    type Message = MavMessage;
16166    const ID: u32 = 114u32;
16167    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16168    const EXTRA_CRC: u8 = 237u8;
16169    const ENCODED_LEN: usize = 44usize;
16170    fn deser(
16171        _version: MavlinkVersion,
16172        __input: &[u8],
16173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16174        let avail_len = __input.len();
16175        let mut payload_buf = [0; Self::ENCODED_LEN];
16176        let mut buf = if avail_len < Self::ENCODED_LEN {
16177            payload_buf[0..avail_len].copy_from_slice(__input);
16178            Bytes::new(&payload_buf)
16179        } else {
16180            Bytes::new(__input)
16181        };
16182        let mut __struct = Self::default();
16183        __struct.time_usec = buf.get_u64_le();
16184        __struct.integration_time_us = buf.get_u32_le();
16185        __struct.integrated_x = buf.get_f32_le();
16186        __struct.integrated_y = buf.get_f32_le();
16187        __struct.integrated_xgyro = buf.get_f32_le();
16188        __struct.integrated_ygyro = buf.get_f32_le();
16189        __struct.integrated_zgyro = buf.get_f32_le();
16190        __struct.time_delta_distance_us = buf.get_u32_le();
16191        __struct.distance = buf.get_f32_le();
16192        __struct.temperature = buf.get_i16_le();
16193        __struct.sensor_id = buf.get_u8();
16194        __struct.quality = buf.get_u8();
16195        Ok(__struct)
16196    }
16197    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16198        let mut __tmp = BytesMut::new(bytes);
16199        #[allow(clippy::absurd_extreme_comparisons)]
16200        #[allow(unused_comparisons)]
16201        if __tmp.remaining() < Self::ENCODED_LEN {
16202            panic!(
16203                "buffer is too small (need {} bytes, but got {})",
16204                Self::ENCODED_LEN,
16205                __tmp.remaining(),
16206            )
16207        }
16208        __tmp.put_u64_le(self.time_usec);
16209        __tmp.put_u32_le(self.integration_time_us);
16210        __tmp.put_f32_le(self.integrated_x);
16211        __tmp.put_f32_le(self.integrated_y);
16212        __tmp.put_f32_le(self.integrated_xgyro);
16213        __tmp.put_f32_le(self.integrated_ygyro);
16214        __tmp.put_f32_le(self.integrated_zgyro);
16215        __tmp.put_u32_le(self.time_delta_distance_us);
16216        __tmp.put_f32_le(self.distance);
16217        __tmp.put_i16_le(self.temperature);
16218        __tmp.put_u8(self.sensor_id);
16219        __tmp.put_u8(self.quality);
16220        if matches!(version, MavlinkVersion::V2) {
16221            let len = __tmp.len();
16222            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16223        } else {
16224            __tmp.len()
16225        }
16226    }
16227}
16228#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16229#[doc = ""]
16230#[doc = "ID: 92"]
16231#[derive(Debug, Clone, PartialEq)]
16232#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16233#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16234#[cfg_attr(feature = "ts", derive(TS))]
16235#[cfg_attr(feature = "ts", ts(export))]
16236pub struct HIL_RC_INPUTS_RAW_DATA {
16237    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16238    pub time_usec: u64,
16239    #[doc = "RC channel 1 value"]
16240    pub chan1_raw: u16,
16241    #[doc = "RC channel 2 value"]
16242    pub chan2_raw: u16,
16243    #[doc = "RC channel 3 value"]
16244    pub chan3_raw: u16,
16245    #[doc = "RC channel 4 value"]
16246    pub chan4_raw: u16,
16247    #[doc = "RC channel 5 value"]
16248    pub chan5_raw: u16,
16249    #[doc = "RC channel 6 value"]
16250    pub chan6_raw: u16,
16251    #[doc = "RC channel 7 value"]
16252    pub chan7_raw: u16,
16253    #[doc = "RC channel 8 value"]
16254    pub chan8_raw: u16,
16255    #[doc = "RC channel 9 value"]
16256    pub chan9_raw: u16,
16257    #[doc = "RC channel 10 value"]
16258    pub chan10_raw: u16,
16259    #[doc = "RC channel 11 value"]
16260    pub chan11_raw: u16,
16261    #[doc = "RC channel 12 value"]
16262    pub chan12_raw: u16,
16263    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16264    pub rssi: u8,
16265}
16266impl HIL_RC_INPUTS_RAW_DATA {
16267    pub const ENCODED_LEN: usize = 33usize;
16268    pub const DEFAULT: Self = Self {
16269        time_usec: 0_u64,
16270        chan1_raw: 0_u16,
16271        chan2_raw: 0_u16,
16272        chan3_raw: 0_u16,
16273        chan4_raw: 0_u16,
16274        chan5_raw: 0_u16,
16275        chan6_raw: 0_u16,
16276        chan7_raw: 0_u16,
16277        chan8_raw: 0_u16,
16278        chan9_raw: 0_u16,
16279        chan10_raw: 0_u16,
16280        chan11_raw: 0_u16,
16281        chan12_raw: 0_u16,
16282        rssi: 0_u8,
16283    };
16284    #[cfg(feature = "arbitrary")]
16285    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16286        use arbitrary::{Arbitrary, Unstructured};
16287        let mut buf = [0u8; 1024];
16288        rng.fill_bytes(&mut buf);
16289        let mut unstructured = Unstructured::new(&buf);
16290        Self::arbitrary(&mut unstructured).unwrap_or_default()
16291    }
16292}
16293impl Default for HIL_RC_INPUTS_RAW_DATA {
16294    fn default() -> Self {
16295        Self::DEFAULT.clone()
16296    }
16297}
16298impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16299    type Message = MavMessage;
16300    const ID: u32 = 92u32;
16301    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16302    const EXTRA_CRC: u8 = 54u8;
16303    const ENCODED_LEN: usize = 33usize;
16304    fn deser(
16305        _version: MavlinkVersion,
16306        __input: &[u8],
16307    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16308        let avail_len = __input.len();
16309        let mut payload_buf = [0; Self::ENCODED_LEN];
16310        let mut buf = if avail_len < Self::ENCODED_LEN {
16311            payload_buf[0..avail_len].copy_from_slice(__input);
16312            Bytes::new(&payload_buf)
16313        } else {
16314            Bytes::new(__input)
16315        };
16316        let mut __struct = Self::default();
16317        __struct.time_usec = buf.get_u64_le();
16318        __struct.chan1_raw = buf.get_u16_le();
16319        __struct.chan2_raw = buf.get_u16_le();
16320        __struct.chan3_raw = buf.get_u16_le();
16321        __struct.chan4_raw = buf.get_u16_le();
16322        __struct.chan5_raw = buf.get_u16_le();
16323        __struct.chan6_raw = buf.get_u16_le();
16324        __struct.chan7_raw = buf.get_u16_le();
16325        __struct.chan8_raw = buf.get_u16_le();
16326        __struct.chan9_raw = buf.get_u16_le();
16327        __struct.chan10_raw = buf.get_u16_le();
16328        __struct.chan11_raw = buf.get_u16_le();
16329        __struct.chan12_raw = buf.get_u16_le();
16330        __struct.rssi = buf.get_u8();
16331        Ok(__struct)
16332    }
16333    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16334        let mut __tmp = BytesMut::new(bytes);
16335        #[allow(clippy::absurd_extreme_comparisons)]
16336        #[allow(unused_comparisons)]
16337        if __tmp.remaining() < Self::ENCODED_LEN {
16338            panic!(
16339                "buffer is too small (need {} bytes, but got {})",
16340                Self::ENCODED_LEN,
16341                __tmp.remaining(),
16342            )
16343        }
16344        __tmp.put_u64_le(self.time_usec);
16345        __tmp.put_u16_le(self.chan1_raw);
16346        __tmp.put_u16_le(self.chan2_raw);
16347        __tmp.put_u16_le(self.chan3_raw);
16348        __tmp.put_u16_le(self.chan4_raw);
16349        __tmp.put_u16_le(self.chan5_raw);
16350        __tmp.put_u16_le(self.chan6_raw);
16351        __tmp.put_u16_le(self.chan7_raw);
16352        __tmp.put_u16_le(self.chan8_raw);
16353        __tmp.put_u16_le(self.chan9_raw);
16354        __tmp.put_u16_le(self.chan10_raw);
16355        __tmp.put_u16_le(self.chan11_raw);
16356        __tmp.put_u16_le(self.chan12_raw);
16357        __tmp.put_u8(self.rssi);
16358        if matches!(version, MavlinkVersion::V2) {
16359            let len = __tmp.len();
16360            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16361        } else {
16362            __tmp.len()
16363        }
16364    }
16365}
16366#[doc = "The IMU readings in SI units in NED body frame."]
16367#[doc = ""]
16368#[doc = "ID: 107"]
16369#[derive(Debug, Clone, PartialEq)]
16370#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16371#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16372#[cfg_attr(feature = "ts", derive(TS))]
16373#[cfg_attr(feature = "ts", ts(export))]
16374pub struct HIL_SENSOR_DATA {
16375    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16376    pub time_usec: u64,
16377    #[doc = "X acceleration"]
16378    pub xacc: f32,
16379    #[doc = "Y acceleration"]
16380    pub yacc: f32,
16381    #[doc = "Z acceleration"]
16382    pub zacc: f32,
16383    #[doc = "Angular speed around X axis in body frame"]
16384    pub xgyro: f32,
16385    #[doc = "Angular speed around Y axis in body frame"]
16386    pub ygyro: f32,
16387    #[doc = "Angular speed around Z axis in body frame"]
16388    pub zgyro: f32,
16389    #[doc = "X Magnetic field"]
16390    pub xmag: f32,
16391    #[doc = "Y Magnetic field"]
16392    pub ymag: f32,
16393    #[doc = "Z Magnetic field"]
16394    pub zmag: f32,
16395    #[doc = "Absolute pressure"]
16396    pub abs_pressure: f32,
16397    #[doc = "Differential pressure (airspeed)"]
16398    pub diff_pressure: f32,
16399    #[doc = "Altitude calculated from pressure"]
16400    pub pressure_alt: f32,
16401    #[doc = "Temperature"]
16402    pub temperature: f32,
16403    #[doc = "Bitmap for fields that have updated since last message"]
16404    pub fields_updated: HilSensorUpdatedFlags,
16405    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16406    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16407    pub id: u8,
16408}
16409impl HIL_SENSOR_DATA {
16410    pub const ENCODED_LEN: usize = 65usize;
16411    pub const DEFAULT: Self = Self {
16412        time_usec: 0_u64,
16413        xacc: 0.0_f32,
16414        yacc: 0.0_f32,
16415        zacc: 0.0_f32,
16416        xgyro: 0.0_f32,
16417        ygyro: 0.0_f32,
16418        zgyro: 0.0_f32,
16419        xmag: 0.0_f32,
16420        ymag: 0.0_f32,
16421        zmag: 0.0_f32,
16422        abs_pressure: 0.0_f32,
16423        diff_pressure: 0.0_f32,
16424        pressure_alt: 0.0_f32,
16425        temperature: 0.0_f32,
16426        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16427        id: 0_u8,
16428    };
16429    #[cfg(feature = "arbitrary")]
16430    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16431        use arbitrary::{Arbitrary, Unstructured};
16432        let mut buf = [0u8; 1024];
16433        rng.fill_bytes(&mut buf);
16434        let mut unstructured = Unstructured::new(&buf);
16435        Self::arbitrary(&mut unstructured).unwrap_or_default()
16436    }
16437}
16438impl Default for HIL_SENSOR_DATA {
16439    fn default() -> Self {
16440        Self::DEFAULT.clone()
16441    }
16442}
16443impl MessageData for HIL_SENSOR_DATA {
16444    type Message = MavMessage;
16445    const ID: u32 = 107u32;
16446    const NAME: &'static str = "HIL_SENSOR";
16447    const EXTRA_CRC: u8 = 108u8;
16448    const ENCODED_LEN: usize = 65usize;
16449    fn deser(
16450        _version: MavlinkVersion,
16451        __input: &[u8],
16452    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16453        let avail_len = __input.len();
16454        let mut payload_buf = [0; Self::ENCODED_LEN];
16455        let mut buf = if avail_len < Self::ENCODED_LEN {
16456            payload_buf[0..avail_len].copy_from_slice(__input);
16457            Bytes::new(&payload_buf)
16458        } else {
16459            Bytes::new(__input)
16460        };
16461        let mut __struct = Self::default();
16462        __struct.time_usec = buf.get_u64_le();
16463        __struct.xacc = buf.get_f32_le();
16464        __struct.yacc = buf.get_f32_le();
16465        __struct.zacc = buf.get_f32_le();
16466        __struct.xgyro = buf.get_f32_le();
16467        __struct.ygyro = buf.get_f32_le();
16468        __struct.zgyro = buf.get_f32_le();
16469        __struct.xmag = buf.get_f32_le();
16470        __struct.ymag = buf.get_f32_le();
16471        __struct.zmag = buf.get_f32_le();
16472        __struct.abs_pressure = buf.get_f32_le();
16473        __struct.diff_pressure = buf.get_f32_le();
16474        __struct.pressure_alt = buf.get_f32_le();
16475        __struct.temperature = buf.get_f32_le();
16476        let tmp = buf.get_u32_le();
16477        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16478            tmp as <HilSensorUpdatedFlags as Flags>::Bits,
16479        )
16480        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16481            flag_type: "HilSensorUpdatedFlags",
16482            value: tmp as u64,
16483        })?;
16484        __struct.id = buf.get_u8();
16485        Ok(__struct)
16486    }
16487    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16488        let mut __tmp = BytesMut::new(bytes);
16489        #[allow(clippy::absurd_extreme_comparisons)]
16490        #[allow(unused_comparisons)]
16491        if __tmp.remaining() < Self::ENCODED_LEN {
16492            panic!(
16493                "buffer is too small (need {} bytes, but got {})",
16494                Self::ENCODED_LEN,
16495                __tmp.remaining(),
16496            )
16497        }
16498        __tmp.put_u64_le(self.time_usec);
16499        __tmp.put_f32_le(self.xacc);
16500        __tmp.put_f32_le(self.yacc);
16501        __tmp.put_f32_le(self.zacc);
16502        __tmp.put_f32_le(self.xgyro);
16503        __tmp.put_f32_le(self.ygyro);
16504        __tmp.put_f32_le(self.zgyro);
16505        __tmp.put_f32_le(self.xmag);
16506        __tmp.put_f32_le(self.ymag);
16507        __tmp.put_f32_le(self.zmag);
16508        __tmp.put_f32_le(self.abs_pressure);
16509        __tmp.put_f32_le(self.diff_pressure);
16510        __tmp.put_f32_le(self.pressure_alt);
16511        __tmp.put_f32_le(self.temperature);
16512        __tmp.put_u32_le(self.fields_updated.bits() as u32);
16513        if matches!(version, MavlinkVersion::V2) {
16514            __tmp.put_u8(self.id);
16515            let len = __tmp.len();
16516            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16517        } else {
16518            __tmp.len()
16519        }
16520    }
16521}
16522#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16523#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16524#[doc = ""]
16525#[doc = "ID: 90"]
16526#[derive(Debug, Clone, PartialEq)]
16527#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16528#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16529#[cfg_attr(feature = "ts", derive(TS))]
16530#[cfg_attr(feature = "ts", ts(export))]
16531pub struct HIL_STATE_DATA {
16532    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16533    pub time_usec: u64,
16534    #[doc = "Roll angle"]
16535    pub roll: f32,
16536    #[doc = "Pitch angle"]
16537    pub pitch: f32,
16538    #[doc = "Yaw angle"]
16539    pub yaw: f32,
16540    #[doc = "Body frame roll / phi angular speed"]
16541    pub rollspeed: f32,
16542    #[doc = "Body frame pitch / theta angular speed"]
16543    pub pitchspeed: f32,
16544    #[doc = "Body frame yaw / psi angular speed"]
16545    pub yawspeed: f32,
16546    #[doc = "Latitude"]
16547    pub lat: i32,
16548    #[doc = "Longitude"]
16549    pub lon: i32,
16550    #[doc = "Altitude"]
16551    pub alt: i32,
16552    #[doc = "Ground X Speed (Latitude)"]
16553    pub vx: i16,
16554    #[doc = "Ground Y Speed (Longitude)"]
16555    pub vy: i16,
16556    #[doc = "Ground Z Speed (Altitude)"]
16557    pub vz: i16,
16558    #[doc = "X acceleration"]
16559    pub xacc: i16,
16560    #[doc = "Y acceleration"]
16561    pub yacc: i16,
16562    #[doc = "Z acceleration"]
16563    pub zacc: i16,
16564}
16565impl HIL_STATE_DATA {
16566    pub const ENCODED_LEN: usize = 56usize;
16567    pub const DEFAULT: Self = Self {
16568        time_usec: 0_u64,
16569        roll: 0.0_f32,
16570        pitch: 0.0_f32,
16571        yaw: 0.0_f32,
16572        rollspeed: 0.0_f32,
16573        pitchspeed: 0.0_f32,
16574        yawspeed: 0.0_f32,
16575        lat: 0_i32,
16576        lon: 0_i32,
16577        alt: 0_i32,
16578        vx: 0_i16,
16579        vy: 0_i16,
16580        vz: 0_i16,
16581        xacc: 0_i16,
16582        yacc: 0_i16,
16583        zacc: 0_i16,
16584    };
16585    #[cfg(feature = "arbitrary")]
16586    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16587        use arbitrary::{Arbitrary, Unstructured};
16588        let mut buf = [0u8; 1024];
16589        rng.fill_bytes(&mut buf);
16590        let mut unstructured = Unstructured::new(&buf);
16591        Self::arbitrary(&mut unstructured).unwrap_or_default()
16592    }
16593}
16594impl Default for HIL_STATE_DATA {
16595    fn default() -> Self {
16596        Self::DEFAULT.clone()
16597    }
16598}
16599impl MessageData for HIL_STATE_DATA {
16600    type Message = MavMessage;
16601    const ID: u32 = 90u32;
16602    const NAME: &'static str = "HIL_STATE";
16603    const EXTRA_CRC: u8 = 183u8;
16604    const ENCODED_LEN: usize = 56usize;
16605    fn deser(
16606        _version: MavlinkVersion,
16607        __input: &[u8],
16608    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16609        let avail_len = __input.len();
16610        let mut payload_buf = [0; Self::ENCODED_LEN];
16611        let mut buf = if avail_len < Self::ENCODED_LEN {
16612            payload_buf[0..avail_len].copy_from_slice(__input);
16613            Bytes::new(&payload_buf)
16614        } else {
16615            Bytes::new(__input)
16616        };
16617        let mut __struct = Self::default();
16618        __struct.time_usec = buf.get_u64_le();
16619        __struct.roll = buf.get_f32_le();
16620        __struct.pitch = buf.get_f32_le();
16621        __struct.yaw = buf.get_f32_le();
16622        __struct.rollspeed = buf.get_f32_le();
16623        __struct.pitchspeed = buf.get_f32_le();
16624        __struct.yawspeed = buf.get_f32_le();
16625        __struct.lat = buf.get_i32_le();
16626        __struct.lon = buf.get_i32_le();
16627        __struct.alt = buf.get_i32_le();
16628        __struct.vx = buf.get_i16_le();
16629        __struct.vy = buf.get_i16_le();
16630        __struct.vz = buf.get_i16_le();
16631        __struct.xacc = buf.get_i16_le();
16632        __struct.yacc = buf.get_i16_le();
16633        __struct.zacc = buf.get_i16_le();
16634        Ok(__struct)
16635    }
16636    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16637        let mut __tmp = BytesMut::new(bytes);
16638        #[allow(clippy::absurd_extreme_comparisons)]
16639        #[allow(unused_comparisons)]
16640        if __tmp.remaining() < Self::ENCODED_LEN {
16641            panic!(
16642                "buffer is too small (need {} bytes, but got {})",
16643                Self::ENCODED_LEN,
16644                __tmp.remaining(),
16645            )
16646        }
16647        __tmp.put_u64_le(self.time_usec);
16648        __tmp.put_f32_le(self.roll);
16649        __tmp.put_f32_le(self.pitch);
16650        __tmp.put_f32_le(self.yaw);
16651        __tmp.put_f32_le(self.rollspeed);
16652        __tmp.put_f32_le(self.pitchspeed);
16653        __tmp.put_f32_le(self.yawspeed);
16654        __tmp.put_i32_le(self.lat);
16655        __tmp.put_i32_le(self.lon);
16656        __tmp.put_i32_le(self.alt);
16657        __tmp.put_i16_le(self.vx);
16658        __tmp.put_i16_le(self.vy);
16659        __tmp.put_i16_le(self.vz);
16660        __tmp.put_i16_le(self.xacc);
16661        __tmp.put_i16_le(self.yacc);
16662        __tmp.put_i16_le(self.zacc);
16663        if matches!(version, MavlinkVersion::V2) {
16664            let len = __tmp.len();
16665            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16666        } else {
16667            __tmp.len()
16668        }
16669    }
16670}
16671#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16672#[doc = ""]
16673#[doc = "ID: 115"]
16674#[derive(Debug, Clone, PartialEq)]
16675#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16676#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16677#[cfg_attr(feature = "ts", derive(TS))]
16678#[cfg_attr(feature = "ts", ts(export))]
16679pub struct HIL_STATE_QUATERNION_DATA {
16680    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16681    pub time_usec: u64,
16682    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16683    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16684    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16685    pub attitude_quaternion: [f32; 4],
16686    #[doc = "Body frame roll / phi angular speed"]
16687    pub rollspeed: f32,
16688    #[doc = "Body frame pitch / theta angular speed"]
16689    pub pitchspeed: f32,
16690    #[doc = "Body frame yaw / psi angular speed"]
16691    pub yawspeed: f32,
16692    #[doc = "Latitude"]
16693    pub lat: i32,
16694    #[doc = "Longitude"]
16695    pub lon: i32,
16696    #[doc = "Altitude"]
16697    pub alt: i32,
16698    #[doc = "Ground X Speed (Latitude)"]
16699    pub vx: i16,
16700    #[doc = "Ground Y Speed (Longitude)"]
16701    pub vy: i16,
16702    #[doc = "Ground Z Speed (Altitude)"]
16703    pub vz: i16,
16704    #[doc = "Indicated airspeed"]
16705    pub ind_airspeed: u16,
16706    #[doc = "True airspeed"]
16707    pub true_airspeed: u16,
16708    #[doc = "X acceleration"]
16709    pub xacc: i16,
16710    #[doc = "Y acceleration"]
16711    pub yacc: i16,
16712    #[doc = "Z acceleration"]
16713    pub zacc: i16,
16714}
16715impl HIL_STATE_QUATERNION_DATA {
16716    pub const ENCODED_LEN: usize = 64usize;
16717    pub const DEFAULT: Self = Self {
16718        time_usec: 0_u64,
16719        attitude_quaternion: [0.0_f32; 4usize],
16720        rollspeed: 0.0_f32,
16721        pitchspeed: 0.0_f32,
16722        yawspeed: 0.0_f32,
16723        lat: 0_i32,
16724        lon: 0_i32,
16725        alt: 0_i32,
16726        vx: 0_i16,
16727        vy: 0_i16,
16728        vz: 0_i16,
16729        ind_airspeed: 0_u16,
16730        true_airspeed: 0_u16,
16731        xacc: 0_i16,
16732        yacc: 0_i16,
16733        zacc: 0_i16,
16734    };
16735    #[cfg(feature = "arbitrary")]
16736    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16737        use arbitrary::{Arbitrary, Unstructured};
16738        let mut buf = [0u8; 1024];
16739        rng.fill_bytes(&mut buf);
16740        let mut unstructured = Unstructured::new(&buf);
16741        Self::arbitrary(&mut unstructured).unwrap_or_default()
16742    }
16743}
16744impl Default for HIL_STATE_QUATERNION_DATA {
16745    fn default() -> Self {
16746        Self::DEFAULT.clone()
16747    }
16748}
16749impl MessageData for HIL_STATE_QUATERNION_DATA {
16750    type Message = MavMessage;
16751    const ID: u32 = 115u32;
16752    const NAME: &'static str = "HIL_STATE_QUATERNION";
16753    const EXTRA_CRC: u8 = 4u8;
16754    const ENCODED_LEN: usize = 64usize;
16755    fn deser(
16756        _version: MavlinkVersion,
16757        __input: &[u8],
16758    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16759        let avail_len = __input.len();
16760        let mut payload_buf = [0; Self::ENCODED_LEN];
16761        let mut buf = if avail_len < Self::ENCODED_LEN {
16762            payload_buf[0..avail_len].copy_from_slice(__input);
16763            Bytes::new(&payload_buf)
16764        } else {
16765            Bytes::new(__input)
16766        };
16767        let mut __struct = Self::default();
16768        __struct.time_usec = buf.get_u64_le();
16769        for v in &mut __struct.attitude_quaternion {
16770            let val = buf.get_f32_le();
16771            *v = val;
16772        }
16773        __struct.rollspeed = buf.get_f32_le();
16774        __struct.pitchspeed = buf.get_f32_le();
16775        __struct.yawspeed = buf.get_f32_le();
16776        __struct.lat = buf.get_i32_le();
16777        __struct.lon = buf.get_i32_le();
16778        __struct.alt = buf.get_i32_le();
16779        __struct.vx = buf.get_i16_le();
16780        __struct.vy = buf.get_i16_le();
16781        __struct.vz = buf.get_i16_le();
16782        __struct.ind_airspeed = buf.get_u16_le();
16783        __struct.true_airspeed = buf.get_u16_le();
16784        __struct.xacc = buf.get_i16_le();
16785        __struct.yacc = buf.get_i16_le();
16786        __struct.zacc = buf.get_i16_le();
16787        Ok(__struct)
16788    }
16789    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16790        let mut __tmp = BytesMut::new(bytes);
16791        #[allow(clippy::absurd_extreme_comparisons)]
16792        #[allow(unused_comparisons)]
16793        if __tmp.remaining() < Self::ENCODED_LEN {
16794            panic!(
16795                "buffer is too small (need {} bytes, but got {})",
16796                Self::ENCODED_LEN,
16797                __tmp.remaining(),
16798            )
16799        }
16800        __tmp.put_u64_le(self.time_usec);
16801        for val in &self.attitude_quaternion {
16802            __tmp.put_f32_le(*val);
16803        }
16804        __tmp.put_f32_le(self.rollspeed);
16805        __tmp.put_f32_le(self.pitchspeed);
16806        __tmp.put_f32_le(self.yawspeed);
16807        __tmp.put_i32_le(self.lat);
16808        __tmp.put_i32_le(self.lon);
16809        __tmp.put_i32_le(self.alt);
16810        __tmp.put_i16_le(self.vx);
16811        __tmp.put_i16_le(self.vy);
16812        __tmp.put_i16_le(self.vz);
16813        __tmp.put_u16_le(self.ind_airspeed);
16814        __tmp.put_u16_le(self.true_airspeed);
16815        __tmp.put_i16_le(self.xacc);
16816        __tmp.put_i16_le(self.yacc);
16817        __tmp.put_i16_le(self.zacc);
16818        if matches!(version, MavlinkVersion::V2) {
16819            let len = __tmp.len();
16820            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16821        } else {
16822            __tmp.len()
16823        }
16824    }
16825}
16826#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16827#[doc = ""]
16828#[doc = "ID: 242"]
16829#[derive(Debug, Clone, PartialEq)]
16830#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16831#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16832#[cfg_attr(feature = "ts", derive(TS))]
16833#[cfg_attr(feature = "ts", ts(export))]
16834pub struct HOME_POSITION_DATA {
16835    #[doc = "Latitude (WGS84)"]
16836    pub latitude: i32,
16837    #[doc = "Longitude (WGS84)"]
16838    pub longitude: i32,
16839    #[doc = "Altitude (MSL). Positive for up."]
16840    pub altitude: i32,
16841    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16842    pub x: f32,
16843    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16844    pub y: f32,
16845    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16846    pub z: f32,
16847    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16848    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16849    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16850    pub q: [f32; 4],
16851    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16852    pub approach_x: f32,
16853    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16854    pub approach_y: f32,
16855    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16856    pub approach_z: f32,
16857    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16858    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16859    pub time_usec: u64,
16860}
16861impl HOME_POSITION_DATA {
16862    pub const ENCODED_LEN: usize = 60usize;
16863    pub const DEFAULT: Self = Self {
16864        latitude: 0_i32,
16865        longitude: 0_i32,
16866        altitude: 0_i32,
16867        x: 0.0_f32,
16868        y: 0.0_f32,
16869        z: 0.0_f32,
16870        q: [0.0_f32; 4usize],
16871        approach_x: 0.0_f32,
16872        approach_y: 0.0_f32,
16873        approach_z: 0.0_f32,
16874        time_usec: 0_u64,
16875    };
16876    #[cfg(feature = "arbitrary")]
16877    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16878        use arbitrary::{Arbitrary, Unstructured};
16879        let mut buf = [0u8; 1024];
16880        rng.fill_bytes(&mut buf);
16881        let mut unstructured = Unstructured::new(&buf);
16882        Self::arbitrary(&mut unstructured).unwrap_or_default()
16883    }
16884}
16885impl Default for HOME_POSITION_DATA {
16886    fn default() -> Self {
16887        Self::DEFAULT.clone()
16888    }
16889}
16890impl MessageData for HOME_POSITION_DATA {
16891    type Message = MavMessage;
16892    const ID: u32 = 242u32;
16893    const NAME: &'static str = "HOME_POSITION";
16894    const EXTRA_CRC: u8 = 104u8;
16895    const ENCODED_LEN: usize = 60usize;
16896    fn deser(
16897        _version: MavlinkVersion,
16898        __input: &[u8],
16899    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16900        let avail_len = __input.len();
16901        let mut payload_buf = [0; Self::ENCODED_LEN];
16902        let mut buf = if avail_len < Self::ENCODED_LEN {
16903            payload_buf[0..avail_len].copy_from_slice(__input);
16904            Bytes::new(&payload_buf)
16905        } else {
16906            Bytes::new(__input)
16907        };
16908        let mut __struct = Self::default();
16909        __struct.latitude = buf.get_i32_le();
16910        __struct.longitude = buf.get_i32_le();
16911        __struct.altitude = buf.get_i32_le();
16912        __struct.x = buf.get_f32_le();
16913        __struct.y = buf.get_f32_le();
16914        __struct.z = buf.get_f32_le();
16915        for v in &mut __struct.q {
16916            let val = buf.get_f32_le();
16917            *v = val;
16918        }
16919        __struct.approach_x = buf.get_f32_le();
16920        __struct.approach_y = buf.get_f32_le();
16921        __struct.approach_z = buf.get_f32_le();
16922        __struct.time_usec = buf.get_u64_le();
16923        Ok(__struct)
16924    }
16925    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16926        let mut __tmp = BytesMut::new(bytes);
16927        #[allow(clippy::absurd_extreme_comparisons)]
16928        #[allow(unused_comparisons)]
16929        if __tmp.remaining() < Self::ENCODED_LEN {
16930            panic!(
16931                "buffer is too small (need {} bytes, but got {})",
16932                Self::ENCODED_LEN,
16933                __tmp.remaining(),
16934            )
16935        }
16936        __tmp.put_i32_le(self.latitude);
16937        __tmp.put_i32_le(self.longitude);
16938        __tmp.put_i32_le(self.altitude);
16939        __tmp.put_f32_le(self.x);
16940        __tmp.put_f32_le(self.y);
16941        __tmp.put_f32_le(self.z);
16942        for val in &self.q {
16943            __tmp.put_f32_le(*val);
16944        }
16945        __tmp.put_f32_le(self.approach_x);
16946        __tmp.put_f32_le(self.approach_y);
16947        __tmp.put_f32_le(self.approach_z);
16948        if matches!(version, MavlinkVersion::V2) {
16949            __tmp.put_u64_le(self.time_usec);
16950            let len = __tmp.len();
16951            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16952        } else {
16953            __tmp.len()
16954        }
16955    }
16956}
16957#[doc = "Temperature and humidity from hygrometer."]
16958#[doc = ""]
16959#[doc = "ID: 12920"]
16960#[derive(Debug, Clone, PartialEq)]
16961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16962#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16963#[cfg_attr(feature = "ts", derive(TS))]
16964#[cfg_attr(feature = "ts", ts(export))]
16965pub struct HYGROMETER_SENSOR_DATA {
16966    #[doc = "Temperature"]
16967    pub temperature: i16,
16968    #[doc = "Humidity"]
16969    pub humidity: u16,
16970    #[doc = "Hygrometer ID"]
16971    pub id: u8,
16972}
16973impl HYGROMETER_SENSOR_DATA {
16974    pub const ENCODED_LEN: usize = 5usize;
16975    pub const DEFAULT: Self = Self {
16976        temperature: 0_i16,
16977        humidity: 0_u16,
16978        id: 0_u8,
16979    };
16980    #[cfg(feature = "arbitrary")]
16981    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16982        use arbitrary::{Arbitrary, Unstructured};
16983        let mut buf = [0u8; 1024];
16984        rng.fill_bytes(&mut buf);
16985        let mut unstructured = Unstructured::new(&buf);
16986        Self::arbitrary(&mut unstructured).unwrap_or_default()
16987    }
16988}
16989impl Default for HYGROMETER_SENSOR_DATA {
16990    fn default() -> Self {
16991        Self::DEFAULT.clone()
16992    }
16993}
16994impl MessageData for HYGROMETER_SENSOR_DATA {
16995    type Message = MavMessage;
16996    const ID: u32 = 12920u32;
16997    const NAME: &'static str = "HYGROMETER_SENSOR";
16998    const EXTRA_CRC: u8 = 20u8;
16999    const ENCODED_LEN: usize = 5usize;
17000    fn deser(
17001        _version: MavlinkVersion,
17002        __input: &[u8],
17003    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17004        let avail_len = __input.len();
17005        let mut payload_buf = [0; Self::ENCODED_LEN];
17006        let mut buf = if avail_len < Self::ENCODED_LEN {
17007            payload_buf[0..avail_len].copy_from_slice(__input);
17008            Bytes::new(&payload_buf)
17009        } else {
17010            Bytes::new(__input)
17011        };
17012        let mut __struct = Self::default();
17013        __struct.temperature = buf.get_i16_le();
17014        __struct.humidity = buf.get_u16_le();
17015        __struct.id = buf.get_u8();
17016        Ok(__struct)
17017    }
17018    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17019        let mut __tmp = BytesMut::new(bytes);
17020        #[allow(clippy::absurd_extreme_comparisons)]
17021        #[allow(unused_comparisons)]
17022        if __tmp.remaining() < Self::ENCODED_LEN {
17023            panic!(
17024                "buffer is too small (need {} bytes, but got {})",
17025                Self::ENCODED_LEN,
17026                __tmp.remaining(),
17027            )
17028        }
17029        __tmp.put_i16_le(self.temperature);
17030        __tmp.put_u16_le(self.humidity);
17031        __tmp.put_u8(self.id);
17032        if matches!(version, MavlinkVersion::V2) {
17033            let len = __tmp.len();
17034            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17035        } else {
17036            __tmp.len()
17037        }
17038    }
17039}
17040#[doc = "Illuminator status."]
17041#[doc = ""]
17042#[doc = "ID: 440"]
17043#[derive(Debug, Clone, PartialEq)]
17044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17045#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17046#[cfg_attr(feature = "ts", derive(TS))]
17047#[cfg_attr(feature = "ts", ts(export))]
17048pub struct ILLUMINATOR_STATUS_DATA {
17049    #[doc = "Time since the start-up of the illuminator in ms"]
17050    pub uptime_ms: u32,
17051    #[doc = "Errors"]
17052    pub error_status: IlluminatorErrorFlags,
17053    #[doc = "Illuminator brightness"]
17054    pub brightness: f32,
17055    #[doc = "Illuminator strobing period in seconds"]
17056    pub strobe_period: f32,
17057    #[doc = "Illuminator strobing duty cycle"]
17058    pub strobe_duty_cycle: f32,
17059    #[doc = "Temperature in Celsius"]
17060    pub temp_c: f32,
17061    #[doc = "Minimum strobing period in seconds"]
17062    pub min_strobe_period: f32,
17063    #[doc = "Maximum strobing period in seconds"]
17064    pub max_strobe_period: f32,
17065    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17066    pub enable: u8,
17067    #[doc = "Supported illuminator modes"]
17068    pub mode_bitmask: IlluminatorMode,
17069    #[doc = "Illuminator mode"]
17070    pub mode: IlluminatorMode,
17071}
17072impl ILLUMINATOR_STATUS_DATA {
17073    pub const ENCODED_LEN: usize = 35usize;
17074    pub const DEFAULT: Self = Self {
17075        uptime_ms: 0_u32,
17076        error_status: IlluminatorErrorFlags::DEFAULT,
17077        brightness: 0.0_f32,
17078        strobe_period: 0.0_f32,
17079        strobe_duty_cycle: 0.0_f32,
17080        temp_c: 0.0_f32,
17081        min_strobe_period: 0.0_f32,
17082        max_strobe_period: 0.0_f32,
17083        enable: 0_u8,
17084        mode_bitmask: IlluminatorMode::DEFAULT,
17085        mode: IlluminatorMode::DEFAULT,
17086    };
17087    #[cfg(feature = "arbitrary")]
17088    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17089        use arbitrary::{Arbitrary, Unstructured};
17090        let mut buf = [0u8; 1024];
17091        rng.fill_bytes(&mut buf);
17092        let mut unstructured = Unstructured::new(&buf);
17093        Self::arbitrary(&mut unstructured).unwrap_or_default()
17094    }
17095}
17096impl Default for ILLUMINATOR_STATUS_DATA {
17097    fn default() -> Self {
17098        Self::DEFAULT.clone()
17099    }
17100}
17101impl MessageData for ILLUMINATOR_STATUS_DATA {
17102    type Message = MavMessage;
17103    const ID: u32 = 440u32;
17104    const NAME: &'static str = "ILLUMINATOR_STATUS";
17105    const EXTRA_CRC: u8 = 66u8;
17106    const ENCODED_LEN: usize = 35usize;
17107    fn deser(
17108        _version: MavlinkVersion,
17109        __input: &[u8],
17110    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17111        let avail_len = __input.len();
17112        let mut payload_buf = [0; Self::ENCODED_LEN];
17113        let mut buf = if avail_len < Self::ENCODED_LEN {
17114            payload_buf[0..avail_len].copy_from_slice(__input);
17115            Bytes::new(&payload_buf)
17116        } else {
17117            Bytes::new(__input)
17118        };
17119        let mut __struct = Self::default();
17120        __struct.uptime_ms = buf.get_u32_le();
17121        let tmp = buf.get_u32_le();
17122        __struct.error_status = IlluminatorErrorFlags::from_bits(
17123            tmp as <IlluminatorErrorFlags as Flags>::Bits,
17124        )
17125        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17126            flag_type: "IlluminatorErrorFlags",
17127            value: tmp as u64,
17128        })?;
17129        __struct.brightness = buf.get_f32_le();
17130        __struct.strobe_period = buf.get_f32_le();
17131        __struct.strobe_duty_cycle = buf.get_f32_le();
17132        __struct.temp_c = buf.get_f32_le();
17133        __struct.min_strobe_period = buf.get_f32_le();
17134        __struct.max_strobe_period = buf.get_f32_le();
17135        __struct.enable = buf.get_u8();
17136        let tmp = buf.get_u8();
17137        __struct.mode_bitmask =
17138            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17139                enum_type: "IlluminatorMode",
17140                value: tmp as u64,
17141            })?;
17142        let tmp = buf.get_u8();
17143        __struct.mode =
17144            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17145                enum_type: "IlluminatorMode",
17146                value: tmp as u64,
17147            })?;
17148        Ok(__struct)
17149    }
17150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17151        let mut __tmp = BytesMut::new(bytes);
17152        #[allow(clippy::absurd_extreme_comparisons)]
17153        #[allow(unused_comparisons)]
17154        if __tmp.remaining() < Self::ENCODED_LEN {
17155            panic!(
17156                "buffer is too small (need {} bytes, but got {})",
17157                Self::ENCODED_LEN,
17158                __tmp.remaining(),
17159            )
17160        }
17161        __tmp.put_u32_le(self.uptime_ms);
17162        __tmp.put_u32_le(self.error_status.bits() as u32);
17163        __tmp.put_f32_le(self.brightness);
17164        __tmp.put_f32_le(self.strobe_period);
17165        __tmp.put_f32_le(self.strobe_duty_cycle);
17166        __tmp.put_f32_le(self.temp_c);
17167        __tmp.put_f32_le(self.min_strobe_period);
17168        __tmp.put_f32_le(self.max_strobe_period);
17169        __tmp.put_u8(self.enable);
17170        __tmp.put_u8(self.mode_bitmask as u8);
17171        __tmp.put_u8(self.mode as u8);
17172        if matches!(version, MavlinkVersion::V2) {
17173            let len = __tmp.len();
17174            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17175        } else {
17176            __tmp.len()
17177        }
17178    }
17179}
17180#[doc = "Status of the Iridium SBD link."]
17181#[doc = ""]
17182#[doc = "ID: 335"]
17183#[derive(Debug, Clone, PartialEq)]
17184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17186#[cfg_attr(feature = "ts", derive(TS))]
17187#[cfg_attr(feature = "ts", ts(export))]
17188pub struct ISBD_LINK_STATUS_DATA {
17189    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17190    pub timestamp: u64,
17191    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17192    pub last_heartbeat: u64,
17193    #[doc = "Number of failed SBD sessions."]
17194    pub failed_sessions: u16,
17195    #[doc = "Number of successful SBD sessions."]
17196    pub successful_sessions: u16,
17197    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17198    pub signal_quality: u8,
17199    #[doc = "1: Ring call pending, 0: No call pending."]
17200    pub ring_pending: u8,
17201    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17202    pub tx_session_pending: u8,
17203    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17204    pub rx_session_pending: u8,
17205}
17206impl ISBD_LINK_STATUS_DATA {
17207    pub const ENCODED_LEN: usize = 24usize;
17208    pub const DEFAULT: Self = Self {
17209        timestamp: 0_u64,
17210        last_heartbeat: 0_u64,
17211        failed_sessions: 0_u16,
17212        successful_sessions: 0_u16,
17213        signal_quality: 0_u8,
17214        ring_pending: 0_u8,
17215        tx_session_pending: 0_u8,
17216        rx_session_pending: 0_u8,
17217    };
17218    #[cfg(feature = "arbitrary")]
17219    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17220        use arbitrary::{Arbitrary, Unstructured};
17221        let mut buf = [0u8; 1024];
17222        rng.fill_bytes(&mut buf);
17223        let mut unstructured = Unstructured::new(&buf);
17224        Self::arbitrary(&mut unstructured).unwrap_or_default()
17225    }
17226}
17227impl Default for ISBD_LINK_STATUS_DATA {
17228    fn default() -> Self {
17229        Self::DEFAULT.clone()
17230    }
17231}
17232impl MessageData for ISBD_LINK_STATUS_DATA {
17233    type Message = MavMessage;
17234    const ID: u32 = 335u32;
17235    const NAME: &'static str = "ISBD_LINK_STATUS";
17236    const EXTRA_CRC: u8 = 225u8;
17237    const ENCODED_LEN: usize = 24usize;
17238    fn deser(
17239        _version: MavlinkVersion,
17240        __input: &[u8],
17241    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17242        let avail_len = __input.len();
17243        let mut payload_buf = [0; Self::ENCODED_LEN];
17244        let mut buf = if avail_len < Self::ENCODED_LEN {
17245            payload_buf[0..avail_len].copy_from_slice(__input);
17246            Bytes::new(&payload_buf)
17247        } else {
17248            Bytes::new(__input)
17249        };
17250        let mut __struct = Self::default();
17251        __struct.timestamp = buf.get_u64_le();
17252        __struct.last_heartbeat = buf.get_u64_le();
17253        __struct.failed_sessions = buf.get_u16_le();
17254        __struct.successful_sessions = buf.get_u16_le();
17255        __struct.signal_quality = buf.get_u8();
17256        __struct.ring_pending = buf.get_u8();
17257        __struct.tx_session_pending = buf.get_u8();
17258        __struct.rx_session_pending = buf.get_u8();
17259        Ok(__struct)
17260    }
17261    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17262        let mut __tmp = BytesMut::new(bytes);
17263        #[allow(clippy::absurd_extreme_comparisons)]
17264        #[allow(unused_comparisons)]
17265        if __tmp.remaining() < Self::ENCODED_LEN {
17266            panic!(
17267                "buffer is too small (need {} bytes, but got {})",
17268                Self::ENCODED_LEN,
17269                __tmp.remaining(),
17270            )
17271        }
17272        __tmp.put_u64_le(self.timestamp);
17273        __tmp.put_u64_le(self.last_heartbeat);
17274        __tmp.put_u16_le(self.failed_sessions);
17275        __tmp.put_u16_le(self.successful_sessions);
17276        __tmp.put_u8(self.signal_quality);
17277        __tmp.put_u8(self.ring_pending);
17278        __tmp.put_u8(self.tx_session_pending);
17279        __tmp.put_u8(self.rx_session_pending);
17280        if matches!(version, MavlinkVersion::V2) {
17281            let len = __tmp.len();
17282            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17283        } else {
17284            __tmp.len()
17285        }
17286    }
17287}
17288#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17289#[doc = ""]
17290#[doc = "ID: 149"]
17291#[derive(Debug, Clone, PartialEq)]
17292#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17293#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17294#[cfg_attr(feature = "ts", derive(TS))]
17295#[cfg_attr(feature = "ts", ts(export))]
17296pub struct LANDING_TARGET_DATA {
17297    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17298    pub time_usec: u64,
17299    #[doc = "X-axis angular offset of the target from the center of the image"]
17300    pub angle_x: f32,
17301    #[doc = "Y-axis angular offset of the target from the center of the image"]
17302    pub angle_y: f32,
17303    #[doc = "Distance to the target from the vehicle"]
17304    pub distance: f32,
17305    #[doc = "Size of target along x-axis"]
17306    pub size_x: f32,
17307    #[doc = "Size of target along y-axis"]
17308    pub size_y: f32,
17309    #[doc = "The ID of the target if multiple targets are present"]
17310    pub target_num: u8,
17311    #[doc = "Coordinate frame used for following fields."]
17312    pub frame: MavFrame,
17313    #[doc = "X Position of the landing target in MAV_FRAME"]
17314    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17315    pub x: f32,
17316    #[doc = "Y Position of the landing target in MAV_FRAME"]
17317    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17318    pub y: f32,
17319    #[doc = "Z Position of the landing target in MAV_FRAME"]
17320    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17321    pub z: f32,
17322    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17323    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17324    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17325    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17326    pub q: [f32; 4],
17327    #[doc = "Type of landing target"]
17328    #[cfg_attr(feature = "serde", serde(default))]
17329    pub mavtype: LandingTargetType,
17330    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17331    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17332    pub position_valid: u8,
17333}
17334impl LANDING_TARGET_DATA {
17335    pub const ENCODED_LEN: usize = 60usize;
17336    pub const DEFAULT: Self = Self {
17337        time_usec: 0_u64,
17338        angle_x: 0.0_f32,
17339        angle_y: 0.0_f32,
17340        distance: 0.0_f32,
17341        size_x: 0.0_f32,
17342        size_y: 0.0_f32,
17343        target_num: 0_u8,
17344        frame: MavFrame::DEFAULT,
17345        x: 0.0_f32,
17346        y: 0.0_f32,
17347        z: 0.0_f32,
17348        q: [0.0_f32; 4usize],
17349        mavtype: LandingTargetType::DEFAULT,
17350        position_valid: 0_u8,
17351    };
17352    #[cfg(feature = "arbitrary")]
17353    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17354        use arbitrary::{Arbitrary, Unstructured};
17355        let mut buf = [0u8; 1024];
17356        rng.fill_bytes(&mut buf);
17357        let mut unstructured = Unstructured::new(&buf);
17358        Self::arbitrary(&mut unstructured).unwrap_or_default()
17359    }
17360}
17361impl Default for LANDING_TARGET_DATA {
17362    fn default() -> Self {
17363        Self::DEFAULT.clone()
17364    }
17365}
17366impl MessageData for LANDING_TARGET_DATA {
17367    type Message = MavMessage;
17368    const ID: u32 = 149u32;
17369    const NAME: &'static str = "LANDING_TARGET";
17370    const EXTRA_CRC: u8 = 200u8;
17371    const ENCODED_LEN: usize = 60usize;
17372    fn deser(
17373        _version: MavlinkVersion,
17374        __input: &[u8],
17375    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17376        let avail_len = __input.len();
17377        let mut payload_buf = [0; Self::ENCODED_LEN];
17378        let mut buf = if avail_len < Self::ENCODED_LEN {
17379            payload_buf[0..avail_len].copy_from_slice(__input);
17380            Bytes::new(&payload_buf)
17381        } else {
17382            Bytes::new(__input)
17383        };
17384        let mut __struct = Self::default();
17385        __struct.time_usec = buf.get_u64_le();
17386        __struct.angle_x = buf.get_f32_le();
17387        __struct.angle_y = buf.get_f32_le();
17388        __struct.distance = buf.get_f32_le();
17389        __struct.size_x = buf.get_f32_le();
17390        __struct.size_y = buf.get_f32_le();
17391        __struct.target_num = buf.get_u8();
17392        let tmp = buf.get_u8();
17393        __struct.frame =
17394            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17395                enum_type: "MavFrame",
17396                value: tmp as u64,
17397            })?;
17398        __struct.x = buf.get_f32_le();
17399        __struct.y = buf.get_f32_le();
17400        __struct.z = buf.get_f32_le();
17401        for v in &mut __struct.q {
17402            let val = buf.get_f32_le();
17403            *v = val;
17404        }
17405        let tmp = buf.get_u8();
17406        __struct.mavtype =
17407            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17408                enum_type: "LandingTargetType",
17409                value: tmp as u64,
17410            })?;
17411        __struct.position_valid = buf.get_u8();
17412        Ok(__struct)
17413    }
17414    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17415        let mut __tmp = BytesMut::new(bytes);
17416        #[allow(clippy::absurd_extreme_comparisons)]
17417        #[allow(unused_comparisons)]
17418        if __tmp.remaining() < Self::ENCODED_LEN {
17419            panic!(
17420                "buffer is too small (need {} bytes, but got {})",
17421                Self::ENCODED_LEN,
17422                __tmp.remaining(),
17423            )
17424        }
17425        __tmp.put_u64_le(self.time_usec);
17426        __tmp.put_f32_le(self.angle_x);
17427        __tmp.put_f32_le(self.angle_y);
17428        __tmp.put_f32_le(self.distance);
17429        __tmp.put_f32_le(self.size_x);
17430        __tmp.put_f32_le(self.size_y);
17431        __tmp.put_u8(self.target_num);
17432        __tmp.put_u8(self.frame as u8);
17433        if matches!(version, MavlinkVersion::V2) {
17434            __tmp.put_f32_le(self.x);
17435            __tmp.put_f32_le(self.y);
17436            __tmp.put_f32_le(self.z);
17437            for val in &self.q {
17438                __tmp.put_f32_le(*val);
17439            }
17440            __tmp.put_u8(self.mavtype as u8);
17441            __tmp.put_u8(self.position_valid);
17442            let len = __tmp.len();
17443            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17444        } else {
17445            __tmp.len()
17446        }
17447    }
17448}
17449#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17450#[doc = ""]
17451#[doc = "ID: 8"]
17452#[derive(Debug, Clone, PartialEq)]
17453#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17454#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17455#[cfg_attr(feature = "ts", derive(TS))]
17456#[cfg_attr(feature = "ts", ts(export))]
17457pub struct LINK_NODE_STATUS_DATA {
17458    #[doc = "Timestamp (time since system boot)."]
17459    pub timestamp: u64,
17460    #[doc = "Transmit rate"]
17461    pub tx_rate: u32,
17462    #[doc = "Receive rate"]
17463    pub rx_rate: u32,
17464    #[doc = "Messages sent"]
17465    pub messages_sent: u32,
17466    #[doc = "Messages received (estimated from counting seq)"]
17467    pub messages_received: u32,
17468    #[doc = "Messages lost (estimated from counting seq)"]
17469    pub messages_lost: u32,
17470    #[doc = "Number of bytes that could not be parsed correctly."]
17471    pub rx_parse_err: u16,
17472    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17473    pub tx_overflows: u16,
17474    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17475    pub rx_overflows: u16,
17476    #[doc = "Remaining free transmit buffer space"]
17477    pub tx_buf: u8,
17478    #[doc = "Remaining free receive buffer space"]
17479    pub rx_buf: u8,
17480}
17481impl LINK_NODE_STATUS_DATA {
17482    pub const ENCODED_LEN: usize = 36usize;
17483    pub const DEFAULT: Self = Self {
17484        timestamp: 0_u64,
17485        tx_rate: 0_u32,
17486        rx_rate: 0_u32,
17487        messages_sent: 0_u32,
17488        messages_received: 0_u32,
17489        messages_lost: 0_u32,
17490        rx_parse_err: 0_u16,
17491        tx_overflows: 0_u16,
17492        rx_overflows: 0_u16,
17493        tx_buf: 0_u8,
17494        rx_buf: 0_u8,
17495    };
17496    #[cfg(feature = "arbitrary")]
17497    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17498        use arbitrary::{Arbitrary, Unstructured};
17499        let mut buf = [0u8; 1024];
17500        rng.fill_bytes(&mut buf);
17501        let mut unstructured = Unstructured::new(&buf);
17502        Self::arbitrary(&mut unstructured).unwrap_or_default()
17503    }
17504}
17505impl Default for LINK_NODE_STATUS_DATA {
17506    fn default() -> Self {
17507        Self::DEFAULT.clone()
17508    }
17509}
17510impl MessageData for LINK_NODE_STATUS_DATA {
17511    type Message = MavMessage;
17512    const ID: u32 = 8u32;
17513    const NAME: &'static str = "LINK_NODE_STATUS";
17514    const EXTRA_CRC: u8 = 117u8;
17515    const ENCODED_LEN: usize = 36usize;
17516    fn deser(
17517        _version: MavlinkVersion,
17518        __input: &[u8],
17519    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17520        let avail_len = __input.len();
17521        let mut payload_buf = [0; Self::ENCODED_LEN];
17522        let mut buf = if avail_len < Self::ENCODED_LEN {
17523            payload_buf[0..avail_len].copy_from_slice(__input);
17524            Bytes::new(&payload_buf)
17525        } else {
17526            Bytes::new(__input)
17527        };
17528        let mut __struct = Self::default();
17529        __struct.timestamp = buf.get_u64_le();
17530        __struct.tx_rate = buf.get_u32_le();
17531        __struct.rx_rate = buf.get_u32_le();
17532        __struct.messages_sent = buf.get_u32_le();
17533        __struct.messages_received = buf.get_u32_le();
17534        __struct.messages_lost = buf.get_u32_le();
17535        __struct.rx_parse_err = buf.get_u16_le();
17536        __struct.tx_overflows = buf.get_u16_le();
17537        __struct.rx_overflows = buf.get_u16_le();
17538        __struct.tx_buf = buf.get_u8();
17539        __struct.rx_buf = buf.get_u8();
17540        Ok(__struct)
17541    }
17542    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17543        let mut __tmp = BytesMut::new(bytes);
17544        #[allow(clippy::absurd_extreme_comparisons)]
17545        #[allow(unused_comparisons)]
17546        if __tmp.remaining() < Self::ENCODED_LEN {
17547            panic!(
17548                "buffer is too small (need {} bytes, but got {})",
17549                Self::ENCODED_LEN,
17550                __tmp.remaining(),
17551            )
17552        }
17553        __tmp.put_u64_le(self.timestamp);
17554        __tmp.put_u32_le(self.tx_rate);
17555        __tmp.put_u32_le(self.rx_rate);
17556        __tmp.put_u32_le(self.messages_sent);
17557        __tmp.put_u32_le(self.messages_received);
17558        __tmp.put_u32_le(self.messages_lost);
17559        __tmp.put_u16_le(self.rx_parse_err);
17560        __tmp.put_u16_le(self.tx_overflows);
17561        __tmp.put_u16_le(self.rx_overflows);
17562        __tmp.put_u8(self.tx_buf);
17563        __tmp.put_u8(self.rx_buf);
17564        if matches!(version, MavlinkVersion::V2) {
17565            let len = __tmp.len();
17566            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17567        } else {
17568            __tmp.len()
17569        }
17570    }
17571}
17572#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17573#[doc = ""]
17574#[doc = "ID: 32"]
17575#[derive(Debug, Clone, PartialEq)]
17576#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17577#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17578#[cfg_attr(feature = "ts", derive(TS))]
17579#[cfg_attr(feature = "ts", ts(export))]
17580pub struct LOCAL_POSITION_NED_DATA {
17581    #[doc = "Timestamp (time since system boot)."]
17582    pub time_boot_ms: u32,
17583    #[doc = "X Position"]
17584    pub x: f32,
17585    #[doc = "Y Position"]
17586    pub y: f32,
17587    #[doc = "Z Position"]
17588    pub z: f32,
17589    #[doc = "X Speed"]
17590    pub vx: f32,
17591    #[doc = "Y Speed"]
17592    pub vy: f32,
17593    #[doc = "Z Speed"]
17594    pub vz: f32,
17595}
17596impl LOCAL_POSITION_NED_DATA {
17597    pub const ENCODED_LEN: usize = 28usize;
17598    pub const DEFAULT: Self = Self {
17599        time_boot_ms: 0_u32,
17600        x: 0.0_f32,
17601        y: 0.0_f32,
17602        z: 0.0_f32,
17603        vx: 0.0_f32,
17604        vy: 0.0_f32,
17605        vz: 0.0_f32,
17606    };
17607    #[cfg(feature = "arbitrary")]
17608    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17609        use arbitrary::{Arbitrary, Unstructured};
17610        let mut buf = [0u8; 1024];
17611        rng.fill_bytes(&mut buf);
17612        let mut unstructured = Unstructured::new(&buf);
17613        Self::arbitrary(&mut unstructured).unwrap_or_default()
17614    }
17615}
17616impl Default for LOCAL_POSITION_NED_DATA {
17617    fn default() -> Self {
17618        Self::DEFAULT.clone()
17619    }
17620}
17621impl MessageData for LOCAL_POSITION_NED_DATA {
17622    type Message = MavMessage;
17623    const ID: u32 = 32u32;
17624    const NAME: &'static str = "LOCAL_POSITION_NED";
17625    const EXTRA_CRC: u8 = 185u8;
17626    const ENCODED_LEN: usize = 28usize;
17627    fn deser(
17628        _version: MavlinkVersion,
17629        __input: &[u8],
17630    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17631        let avail_len = __input.len();
17632        let mut payload_buf = [0; Self::ENCODED_LEN];
17633        let mut buf = if avail_len < Self::ENCODED_LEN {
17634            payload_buf[0..avail_len].copy_from_slice(__input);
17635            Bytes::new(&payload_buf)
17636        } else {
17637            Bytes::new(__input)
17638        };
17639        let mut __struct = Self::default();
17640        __struct.time_boot_ms = buf.get_u32_le();
17641        __struct.x = buf.get_f32_le();
17642        __struct.y = buf.get_f32_le();
17643        __struct.z = buf.get_f32_le();
17644        __struct.vx = buf.get_f32_le();
17645        __struct.vy = buf.get_f32_le();
17646        __struct.vz = buf.get_f32_le();
17647        Ok(__struct)
17648    }
17649    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17650        let mut __tmp = BytesMut::new(bytes);
17651        #[allow(clippy::absurd_extreme_comparisons)]
17652        #[allow(unused_comparisons)]
17653        if __tmp.remaining() < Self::ENCODED_LEN {
17654            panic!(
17655                "buffer is too small (need {} bytes, but got {})",
17656                Self::ENCODED_LEN,
17657                __tmp.remaining(),
17658            )
17659        }
17660        __tmp.put_u32_le(self.time_boot_ms);
17661        __tmp.put_f32_le(self.x);
17662        __tmp.put_f32_le(self.y);
17663        __tmp.put_f32_le(self.z);
17664        __tmp.put_f32_le(self.vx);
17665        __tmp.put_f32_le(self.vy);
17666        __tmp.put_f32_le(self.vz);
17667        if matches!(version, MavlinkVersion::V2) {
17668            let len = __tmp.len();
17669            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17670        } else {
17671            __tmp.len()
17672        }
17673    }
17674}
17675#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17676#[doc = ""]
17677#[doc = "ID: 64"]
17678#[derive(Debug, Clone, PartialEq)]
17679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17681#[cfg_attr(feature = "ts", derive(TS))]
17682#[cfg_attr(feature = "ts", ts(export))]
17683pub struct LOCAL_POSITION_NED_COV_DATA {
17684    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17685    pub time_usec: u64,
17686    #[doc = "X Position"]
17687    pub x: f32,
17688    #[doc = "Y Position"]
17689    pub y: f32,
17690    #[doc = "Z Position"]
17691    pub z: f32,
17692    #[doc = "X Speed"]
17693    pub vx: f32,
17694    #[doc = "Y Speed"]
17695    pub vy: f32,
17696    #[doc = "Z Speed"]
17697    pub vz: f32,
17698    #[doc = "X Acceleration"]
17699    pub ax: f32,
17700    #[doc = "Y Acceleration"]
17701    pub ay: f32,
17702    #[doc = "Z Acceleration"]
17703    pub az: f32,
17704    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17705    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17706    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17707    pub covariance: [f32; 45],
17708    #[doc = "Class id of the estimator this estimate originated from."]
17709    pub estimator_type: MavEstimatorType,
17710}
17711impl LOCAL_POSITION_NED_COV_DATA {
17712    pub const ENCODED_LEN: usize = 225usize;
17713    pub const DEFAULT: Self = Self {
17714        time_usec: 0_u64,
17715        x: 0.0_f32,
17716        y: 0.0_f32,
17717        z: 0.0_f32,
17718        vx: 0.0_f32,
17719        vy: 0.0_f32,
17720        vz: 0.0_f32,
17721        ax: 0.0_f32,
17722        ay: 0.0_f32,
17723        az: 0.0_f32,
17724        covariance: [0.0_f32; 45usize],
17725        estimator_type: MavEstimatorType::DEFAULT,
17726    };
17727    #[cfg(feature = "arbitrary")]
17728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17729        use arbitrary::{Arbitrary, Unstructured};
17730        let mut buf = [0u8; 1024];
17731        rng.fill_bytes(&mut buf);
17732        let mut unstructured = Unstructured::new(&buf);
17733        Self::arbitrary(&mut unstructured).unwrap_or_default()
17734    }
17735}
17736impl Default for LOCAL_POSITION_NED_COV_DATA {
17737    fn default() -> Self {
17738        Self::DEFAULT.clone()
17739    }
17740}
17741impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17742    type Message = MavMessage;
17743    const ID: u32 = 64u32;
17744    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17745    const EXTRA_CRC: u8 = 191u8;
17746    const ENCODED_LEN: usize = 225usize;
17747    fn deser(
17748        _version: MavlinkVersion,
17749        __input: &[u8],
17750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17751        let avail_len = __input.len();
17752        let mut payload_buf = [0; Self::ENCODED_LEN];
17753        let mut buf = if avail_len < Self::ENCODED_LEN {
17754            payload_buf[0..avail_len].copy_from_slice(__input);
17755            Bytes::new(&payload_buf)
17756        } else {
17757            Bytes::new(__input)
17758        };
17759        let mut __struct = Self::default();
17760        __struct.time_usec = buf.get_u64_le();
17761        __struct.x = buf.get_f32_le();
17762        __struct.y = buf.get_f32_le();
17763        __struct.z = buf.get_f32_le();
17764        __struct.vx = buf.get_f32_le();
17765        __struct.vy = buf.get_f32_le();
17766        __struct.vz = buf.get_f32_le();
17767        __struct.ax = buf.get_f32_le();
17768        __struct.ay = buf.get_f32_le();
17769        __struct.az = buf.get_f32_le();
17770        for v in &mut __struct.covariance {
17771            let val = buf.get_f32_le();
17772            *v = val;
17773        }
17774        let tmp = buf.get_u8();
17775        __struct.estimator_type =
17776            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17777                enum_type: "MavEstimatorType",
17778                value: tmp as u64,
17779            })?;
17780        Ok(__struct)
17781    }
17782    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17783        let mut __tmp = BytesMut::new(bytes);
17784        #[allow(clippy::absurd_extreme_comparisons)]
17785        #[allow(unused_comparisons)]
17786        if __tmp.remaining() < Self::ENCODED_LEN {
17787            panic!(
17788                "buffer is too small (need {} bytes, but got {})",
17789                Self::ENCODED_LEN,
17790                __tmp.remaining(),
17791            )
17792        }
17793        __tmp.put_u64_le(self.time_usec);
17794        __tmp.put_f32_le(self.x);
17795        __tmp.put_f32_le(self.y);
17796        __tmp.put_f32_le(self.z);
17797        __tmp.put_f32_le(self.vx);
17798        __tmp.put_f32_le(self.vy);
17799        __tmp.put_f32_le(self.vz);
17800        __tmp.put_f32_le(self.ax);
17801        __tmp.put_f32_le(self.ay);
17802        __tmp.put_f32_le(self.az);
17803        for val in &self.covariance {
17804            __tmp.put_f32_le(*val);
17805        }
17806        __tmp.put_u8(self.estimator_type as u8);
17807        if matches!(version, MavlinkVersion::V2) {
17808            let len = __tmp.len();
17809            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17810        } else {
17811            __tmp.len()
17812        }
17813    }
17814}
17815#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17816#[doc = ""]
17817#[doc = "ID: 89"]
17818#[derive(Debug, Clone, PartialEq)]
17819#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17821#[cfg_attr(feature = "ts", derive(TS))]
17822#[cfg_attr(feature = "ts", ts(export))]
17823pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17824    #[doc = "Timestamp (time since system boot)."]
17825    pub time_boot_ms: u32,
17826    #[doc = "X Position"]
17827    pub x: f32,
17828    #[doc = "Y Position"]
17829    pub y: f32,
17830    #[doc = "Z Position"]
17831    pub z: f32,
17832    #[doc = "Roll"]
17833    pub roll: f32,
17834    #[doc = "Pitch"]
17835    pub pitch: f32,
17836    #[doc = "Yaw"]
17837    pub yaw: f32,
17838}
17839impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17840    pub const ENCODED_LEN: usize = 28usize;
17841    pub const DEFAULT: Self = Self {
17842        time_boot_ms: 0_u32,
17843        x: 0.0_f32,
17844        y: 0.0_f32,
17845        z: 0.0_f32,
17846        roll: 0.0_f32,
17847        pitch: 0.0_f32,
17848        yaw: 0.0_f32,
17849    };
17850    #[cfg(feature = "arbitrary")]
17851    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17852        use arbitrary::{Arbitrary, Unstructured};
17853        let mut buf = [0u8; 1024];
17854        rng.fill_bytes(&mut buf);
17855        let mut unstructured = Unstructured::new(&buf);
17856        Self::arbitrary(&mut unstructured).unwrap_or_default()
17857    }
17858}
17859impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17860    fn default() -> Self {
17861        Self::DEFAULT.clone()
17862    }
17863}
17864impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17865    type Message = MavMessage;
17866    const ID: u32 = 89u32;
17867    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17868    const EXTRA_CRC: u8 = 231u8;
17869    const ENCODED_LEN: usize = 28usize;
17870    fn deser(
17871        _version: MavlinkVersion,
17872        __input: &[u8],
17873    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17874        let avail_len = __input.len();
17875        let mut payload_buf = [0; Self::ENCODED_LEN];
17876        let mut buf = if avail_len < Self::ENCODED_LEN {
17877            payload_buf[0..avail_len].copy_from_slice(__input);
17878            Bytes::new(&payload_buf)
17879        } else {
17880            Bytes::new(__input)
17881        };
17882        let mut __struct = Self::default();
17883        __struct.time_boot_ms = buf.get_u32_le();
17884        __struct.x = buf.get_f32_le();
17885        __struct.y = buf.get_f32_le();
17886        __struct.z = buf.get_f32_le();
17887        __struct.roll = buf.get_f32_le();
17888        __struct.pitch = buf.get_f32_le();
17889        __struct.yaw = buf.get_f32_le();
17890        Ok(__struct)
17891    }
17892    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17893        let mut __tmp = BytesMut::new(bytes);
17894        #[allow(clippy::absurd_extreme_comparisons)]
17895        #[allow(unused_comparisons)]
17896        if __tmp.remaining() < Self::ENCODED_LEN {
17897            panic!(
17898                "buffer is too small (need {} bytes, but got {})",
17899                Self::ENCODED_LEN,
17900                __tmp.remaining(),
17901            )
17902        }
17903        __tmp.put_u32_le(self.time_boot_ms);
17904        __tmp.put_f32_le(self.x);
17905        __tmp.put_f32_le(self.y);
17906        __tmp.put_f32_le(self.z);
17907        __tmp.put_f32_le(self.roll);
17908        __tmp.put_f32_le(self.pitch);
17909        __tmp.put_f32_le(self.yaw);
17910        if matches!(version, MavlinkVersion::V2) {
17911            let len = __tmp.len();
17912            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17913        } else {
17914            __tmp.len()
17915        }
17916    }
17917}
17918#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17919#[doc = ""]
17920#[doc = "ID: 268"]
17921#[derive(Debug, Clone, PartialEq)]
17922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17924#[cfg_attr(feature = "ts", derive(TS))]
17925#[cfg_attr(feature = "ts", ts(export))]
17926pub struct LOGGING_ACK_DATA {
17927    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17928    pub sequence: u16,
17929    #[doc = "system ID of the target"]
17930    pub target_system: u8,
17931    #[doc = "component ID of the target"]
17932    pub target_component: u8,
17933}
17934impl LOGGING_ACK_DATA {
17935    pub const ENCODED_LEN: usize = 4usize;
17936    pub const DEFAULT: Self = Self {
17937        sequence: 0_u16,
17938        target_system: 0_u8,
17939        target_component: 0_u8,
17940    };
17941    #[cfg(feature = "arbitrary")]
17942    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17943        use arbitrary::{Arbitrary, Unstructured};
17944        let mut buf = [0u8; 1024];
17945        rng.fill_bytes(&mut buf);
17946        let mut unstructured = Unstructured::new(&buf);
17947        Self::arbitrary(&mut unstructured).unwrap_or_default()
17948    }
17949}
17950impl Default for LOGGING_ACK_DATA {
17951    fn default() -> Self {
17952        Self::DEFAULT.clone()
17953    }
17954}
17955impl MessageData for LOGGING_ACK_DATA {
17956    type Message = MavMessage;
17957    const ID: u32 = 268u32;
17958    const NAME: &'static str = "LOGGING_ACK";
17959    const EXTRA_CRC: u8 = 14u8;
17960    const ENCODED_LEN: usize = 4usize;
17961    fn deser(
17962        _version: MavlinkVersion,
17963        __input: &[u8],
17964    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17965        let avail_len = __input.len();
17966        let mut payload_buf = [0; Self::ENCODED_LEN];
17967        let mut buf = if avail_len < Self::ENCODED_LEN {
17968            payload_buf[0..avail_len].copy_from_slice(__input);
17969            Bytes::new(&payload_buf)
17970        } else {
17971            Bytes::new(__input)
17972        };
17973        let mut __struct = Self::default();
17974        __struct.sequence = buf.get_u16_le();
17975        __struct.target_system = buf.get_u8();
17976        __struct.target_component = buf.get_u8();
17977        Ok(__struct)
17978    }
17979    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17980        let mut __tmp = BytesMut::new(bytes);
17981        #[allow(clippy::absurd_extreme_comparisons)]
17982        #[allow(unused_comparisons)]
17983        if __tmp.remaining() < Self::ENCODED_LEN {
17984            panic!(
17985                "buffer is too small (need {} bytes, but got {})",
17986                Self::ENCODED_LEN,
17987                __tmp.remaining(),
17988            )
17989        }
17990        __tmp.put_u16_le(self.sequence);
17991        __tmp.put_u8(self.target_system);
17992        __tmp.put_u8(self.target_component);
17993        if matches!(version, MavlinkVersion::V2) {
17994            let len = __tmp.len();
17995            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17996        } else {
17997            __tmp.len()
17998        }
17999    }
18000}
18001#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18002#[doc = ""]
18003#[doc = "ID: 266"]
18004#[derive(Debug, Clone, PartialEq)]
18005#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18006#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18007#[cfg_attr(feature = "ts", derive(TS))]
18008#[cfg_attr(feature = "ts", ts(export))]
18009pub struct LOGGING_DATA_DATA {
18010    #[doc = "sequence number (can wrap)"]
18011    pub sequence: u16,
18012    #[doc = "system ID of the target"]
18013    pub target_system: u8,
18014    #[doc = "component ID of the target"]
18015    pub target_component: u8,
18016    #[doc = "data length"]
18017    pub length: u8,
18018    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18019    pub first_message_offset: u8,
18020    #[doc = "logged data"]
18021    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18022    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18023    pub data: [u8; 249],
18024}
18025impl LOGGING_DATA_DATA {
18026    pub const ENCODED_LEN: usize = 255usize;
18027    pub const DEFAULT: Self = Self {
18028        sequence: 0_u16,
18029        target_system: 0_u8,
18030        target_component: 0_u8,
18031        length: 0_u8,
18032        first_message_offset: 0_u8,
18033        data: [0_u8; 249usize],
18034    };
18035    #[cfg(feature = "arbitrary")]
18036    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18037        use arbitrary::{Arbitrary, Unstructured};
18038        let mut buf = [0u8; 1024];
18039        rng.fill_bytes(&mut buf);
18040        let mut unstructured = Unstructured::new(&buf);
18041        Self::arbitrary(&mut unstructured).unwrap_or_default()
18042    }
18043}
18044impl Default for LOGGING_DATA_DATA {
18045    fn default() -> Self {
18046        Self::DEFAULT.clone()
18047    }
18048}
18049impl MessageData for LOGGING_DATA_DATA {
18050    type Message = MavMessage;
18051    const ID: u32 = 266u32;
18052    const NAME: &'static str = "LOGGING_DATA";
18053    const EXTRA_CRC: u8 = 193u8;
18054    const ENCODED_LEN: usize = 255usize;
18055    fn deser(
18056        _version: MavlinkVersion,
18057        __input: &[u8],
18058    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18059        let avail_len = __input.len();
18060        let mut payload_buf = [0; Self::ENCODED_LEN];
18061        let mut buf = if avail_len < Self::ENCODED_LEN {
18062            payload_buf[0..avail_len].copy_from_slice(__input);
18063            Bytes::new(&payload_buf)
18064        } else {
18065            Bytes::new(__input)
18066        };
18067        let mut __struct = Self::default();
18068        __struct.sequence = buf.get_u16_le();
18069        __struct.target_system = buf.get_u8();
18070        __struct.target_component = buf.get_u8();
18071        __struct.length = buf.get_u8();
18072        __struct.first_message_offset = buf.get_u8();
18073        for v in &mut __struct.data {
18074            let val = buf.get_u8();
18075            *v = val;
18076        }
18077        Ok(__struct)
18078    }
18079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18080        let mut __tmp = BytesMut::new(bytes);
18081        #[allow(clippy::absurd_extreme_comparisons)]
18082        #[allow(unused_comparisons)]
18083        if __tmp.remaining() < Self::ENCODED_LEN {
18084            panic!(
18085                "buffer is too small (need {} bytes, but got {})",
18086                Self::ENCODED_LEN,
18087                __tmp.remaining(),
18088            )
18089        }
18090        __tmp.put_u16_le(self.sequence);
18091        __tmp.put_u8(self.target_system);
18092        __tmp.put_u8(self.target_component);
18093        __tmp.put_u8(self.length);
18094        __tmp.put_u8(self.first_message_offset);
18095        for val in &self.data {
18096            __tmp.put_u8(*val);
18097        }
18098        if matches!(version, MavlinkVersion::V2) {
18099            let len = __tmp.len();
18100            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18101        } else {
18102            __tmp.len()
18103        }
18104    }
18105}
18106#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18107#[doc = ""]
18108#[doc = "ID: 267"]
18109#[derive(Debug, Clone, PartialEq)]
18110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18112#[cfg_attr(feature = "ts", derive(TS))]
18113#[cfg_attr(feature = "ts", ts(export))]
18114pub struct LOGGING_DATA_ACKED_DATA {
18115    #[doc = "sequence number (can wrap)"]
18116    pub sequence: u16,
18117    #[doc = "system ID of the target"]
18118    pub target_system: u8,
18119    #[doc = "component ID of the target"]
18120    pub target_component: u8,
18121    #[doc = "data length"]
18122    pub length: u8,
18123    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18124    pub first_message_offset: u8,
18125    #[doc = "logged data"]
18126    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18127    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18128    pub data: [u8; 249],
18129}
18130impl LOGGING_DATA_ACKED_DATA {
18131    pub const ENCODED_LEN: usize = 255usize;
18132    pub const DEFAULT: Self = Self {
18133        sequence: 0_u16,
18134        target_system: 0_u8,
18135        target_component: 0_u8,
18136        length: 0_u8,
18137        first_message_offset: 0_u8,
18138        data: [0_u8; 249usize],
18139    };
18140    #[cfg(feature = "arbitrary")]
18141    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18142        use arbitrary::{Arbitrary, Unstructured};
18143        let mut buf = [0u8; 1024];
18144        rng.fill_bytes(&mut buf);
18145        let mut unstructured = Unstructured::new(&buf);
18146        Self::arbitrary(&mut unstructured).unwrap_or_default()
18147    }
18148}
18149impl Default for LOGGING_DATA_ACKED_DATA {
18150    fn default() -> Self {
18151        Self::DEFAULT.clone()
18152    }
18153}
18154impl MessageData for LOGGING_DATA_ACKED_DATA {
18155    type Message = MavMessage;
18156    const ID: u32 = 267u32;
18157    const NAME: &'static str = "LOGGING_DATA_ACKED";
18158    const EXTRA_CRC: u8 = 35u8;
18159    const ENCODED_LEN: usize = 255usize;
18160    fn deser(
18161        _version: MavlinkVersion,
18162        __input: &[u8],
18163    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18164        let avail_len = __input.len();
18165        let mut payload_buf = [0; Self::ENCODED_LEN];
18166        let mut buf = if avail_len < Self::ENCODED_LEN {
18167            payload_buf[0..avail_len].copy_from_slice(__input);
18168            Bytes::new(&payload_buf)
18169        } else {
18170            Bytes::new(__input)
18171        };
18172        let mut __struct = Self::default();
18173        __struct.sequence = buf.get_u16_le();
18174        __struct.target_system = buf.get_u8();
18175        __struct.target_component = buf.get_u8();
18176        __struct.length = buf.get_u8();
18177        __struct.first_message_offset = buf.get_u8();
18178        for v in &mut __struct.data {
18179            let val = buf.get_u8();
18180            *v = val;
18181        }
18182        Ok(__struct)
18183    }
18184    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18185        let mut __tmp = BytesMut::new(bytes);
18186        #[allow(clippy::absurd_extreme_comparisons)]
18187        #[allow(unused_comparisons)]
18188        if __tmp.remaining() < Self::ENCODED_LEN {
18189            panic!(
18190                "buffer is too small (need {} bytes, but got {})",
18191                Self::ENCODED_LEN,
18192                __tmp.remaining(),
18193            )
18194        }
18195        __tmp.put_u16_le(self.sequence);
18196        __tmp.put_u8(self.target_system);
18197        __tmp.put_u8(self.target_component);
18198        __tmp.put_u8(self.length);
18199        __tmp.put_u8(self.first_message_offset);
18200        for val in &self.data {
18201            __tmp.put_u8(*val);
18202        }
18203        if matches!(version, MavlinkVersion::V2) {
18204            let len = __tmp.len();
18205            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18206        } else {
18207            __tmp.len()
18208        }
18209    }
18210}
18211#[doc = "Reply to LOG_REQUEST_DATA."]
18212#[doc = ""]
18213#[doc = "ID: 120"]
18214#[derive(Debug, Clone, PartialEq)]
18215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18217#[cfg_attr(feature = "ts", derive(TS))]
18218#[cfg_attr(feature = "ts", ts(export))]
18219pub struct LOG_DATA_DATA {
18220    #[doc = "Offset into the log"]
18221    pub ofs: u32,
18222    #[doc = "Log id (from LOG_ENTRY reply)"]
18223    pub id: u16,
18224    #[doc = "Number of bytes (zero for end of log)"]
18225    pub count: u8,
18226    #[doc = "log data"]
18227    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18228    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18229    pub data: [u8; 90],
18230}
18231impl LOG_DATA_DATA {
18232    pub const ENCODED_LEN: usize = 97usize;
18233    pub const DEFAULT: Self = Self {
18234        ofs: 0_u32,
18235        id: 0_u16,
18236        count: 0_u8,
18237        data: [0_u8; 90usize],
18238    };
18239    #[cfg(feature = "arbitrary")]
18240    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18241        use arbitrary::{Arbitrary, Unstructured};
18242        let mut buf = [0u8; 1024];
18243        rng.fill_bytes(&mut buf);
18244        let mut unstructured = Unstructured::new(&buf);
18245        Self::arbitrary(&mut unstructured).unwrap_or_default()
18246    }
18247}
18248impl Default for LOG_DATA_DATA {
18249    fn default() -> Self {
18250        Self::DEFAULT.clone()
18251    }
18252}
18253impl MessageData for LOG_DATA_DATA {
18254    type Message = MavMessage;
18255    const ID: u32 = 120u32;
18256    const NAME: &'static str = "LOG_DATA";
18257    const EXTRA_CRC: u8 = 134u8;
18258    const ENCODED_LEN: usize = 97usize;
18259    fn deser(
18260        _version: MavlinkVersion,
18261        __input: &[u8],
18262    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18263        let avail_len = __input.len();
18264        let mut payload_buf = [0; Self::ENCODED_LEN];
18265        let mut buf = if avail_len < Self::ENCODED_LEN {
18266            payload_buf[0..avail_len].copy_from_slice(__input);
18267            Bytes::new(&payload_buf)
18268        } else {
18269            Bytes::new(__input)
18270        };
18271        let mut __struct = Self::default();
18272        __struct.ofs = buf.get_u32_le();
18273        __struct.id = buf.get_u16_le();
18274        __struct.count = buf.get_u8();
18275        for v in &mut __struct.data {
18276            let val = buf.get_u8();
18277            *v = val;
18278        }
18279        Ok(__struct)
18280    }
18281    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18282        let mut __tmp = BytesMut::new(bytes);
18283        #[allow(clippy::absurd_extreme_comparisons)]
18284        #[allow(unused_comparisons)]
18285        if __tmp.remaining() < Self::ENCODED_LEN {
18286            panic!(
18287                "buffer is too small (need {} bytes, but got {})",
18288                Self::ENCODED_LEN,
18289                __tmp.remaining(),
18290            )
18291        }
18292        __tmp.put_u32_le(self.ofs);
18293        __tmp.put_u16_le(self.id);
18294        __tmp.put_u8(self.count);
18295        for val in &self.data {
18296            __tmp.put_u8(*val);
18297        }
18298        if matches!(version, MavlinkVersion::V2) {
18299            let len = __tmp.len();
18300            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18301        } else {
18302            __tmp.len()
18303        }
18304    }
18305}
18306#[doc = "Reply to LOG_REQUEST_LIST."]
18307#[doc = ""]
18308#[doc = "ID: 118"]
18309#[derive(Debug, Clone, PartialEq)]
18310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18312#[cfg_attr(feature = "ts", derive(TS))]
18313#[cfg_attr(feature = "ts", ts(export))]
18314pub struct LOG_ENTRY_DATA {
18315    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18316    pub time_utc: u32,
18317    #[doc = "Size of the log (may be approximate)"]
18318    pub size: u32,
18319    #[doc = "Log id"]
18320    pub id: u16,
18321    #[doc = "Total number of logs"]
18322    pub num_logs: u16,
18323    #[doc = "High log number"]
18324    pub last_log_num: u16,
18325}
18326impl LOG_ENTRY_DATA {
18327    pub const ENCODED_LEN: usize = 14usize;
18328    pub const DEFAULT: Self = Self {
18329        time_utc: 0_u32,
18330        size: 0_u32,
18331        id: 0_u16,
18332        num_logs: 0_u16,
18333        last_log_num: 0_u16,
18334    };
18335    #[cfg(feature = "arbitrary")]
18336    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18337        use arbitrary::{Arbitrary, Unstructured};
18338        let mut buf = [0u8; 1024];
18339        rng.fill_bytes(&mut buf);
18340        let mut unstructured = Unstructured::new(&buf);
18341        Self::arbitrary(&mut unstructured).unwrap_or_default()
18342    }
18343}
18344impl Default for LOG_ENTRY_DATA {
18345    fn default() -> Self {
18346        Self::DEFAULT.clone()
18347    }
18348}
18349impl MessageData for LOG_ENTRY_DATA {
18350    type Message = MavMessage;
18351    const ID: u32 = 118u32;
18352    const NAME: &'static str = "LOG_ENTRY";
18353    const EXTRA_CRC: u8 = 56u8;
18354    const ENCODED_LEN: usize = 14usize;
18355    fn deser(
18356        _version: MavlinkVersion,
18357        __input: &[u8],
18358    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18359        let avail_len = __input.len();
18360        let mut payload_buf = [0; Self::ENCODED_LEN];
18361        let mut buf = if avail_len < Self::ENCODED_LEN {
18362            payload_buf[0..avail_len].copy_from_slice(__input);
18363            Bytes::new(&payload_buf)
18364        } else {
18365            Bytes::new(__input)
18366        };
18367        let mut __struct = Self::default();
18368        __struct.time_utc = buf.get_u32_le();
18369        __struct.size = buf.get_u32_le();
18370        __struct.id = buf.get_u16_le();
18371        __struct.num_logs = buf.get_u16_le();
18372        __struct.last_log_num = buf.get_u16_le();
18373        Ok(__struct)
18374    }
18375    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18376        let mut __tmp = BytesMut::new(bytes);
18377        #[allow(clippy::absurd_extreme_comparisons)]
18378        #[allow(unused_comparisons)]
18379        if __tmp.remaining() < Self::ENCODED_LEN {
18380            panic!(
18381                "buffer is too small (need {} bytes, but got {})",
18382                Self::ENCODED_LEN,
18383                __tmp.remaining(),
18384            )
18385        }
18386        __tmp.put_u32_le(self.time_utc);
18387        __tmp.put_u32_le(self.size);
18388        __tmp.put_u16_le(self.id);
18389        __tmp.put_u16_le(self.num_logs);
18390        __tmp.put_u16_le(self.last_log_num);
18391        if matches!(version, MavlinkVersion::V2) {
18392            let len = __tmp.len();
18393            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18394        } else {
18395            __tmp.len()
18396        }
18397    }
18398}
18399#[doc = "Erase all logs."]
18400#[doc = ""]
18401#[doc = "ID: 121"]
18402#[derive(Debug, Clone, PartialEq)]
18403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18404#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18405#[cfg_attr(feature = "ts", derive(TS))]
18406#[cfg_attr(feature = "ts", ts(export))]
18407pub struct LOG_ERASE_DATA {
18408    #[doc = "System ID"]
18409    pub target_system: u8,
18410    #[doc = "Component ID"]
18411    pub target_component: u8,
18412}
18413impl LOG_ERASE_DATA {
18414    pub const ENCODED_LEN: usize = 2usize;
18415    pub const DEFAULT: Self = Self {
18416        target_system: 0_u8,
18417        target_component: 0_u8,
18418    };
18419    #[cfg(feature = "arbitrary")]
18420    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18421        use arbitrary::{Arbitrary, Unstructured};
18422        let mut buf = [0u8; 1024];
18423        rng.fill_bytes(&mut buf);
18424        let mut unstructured = Unstructured::new(&buf);
18425        Self::arbitrary(&mut unstructured).unwrap_or_default()
18426    }
18427}
18428impl Default for LOG_ERASE_DATA {
18429    fn default() -> Self {
18430        Self::DEFAULT.clone()
18431    }
18432}
18433impl MessageData for LOG_ERASE_DATA {
18434    type Message = MavMessage;
18435    const ID: u32 = 121u32;
18436    const NAME: &'static str = "LOG_ERASE";
18437    const EXTRA_CRC: u8 = 237u8;
18438    const ENCODED_LEN: usize = 2usize;
18439    fn deser(
18440        _version: MavlinkVersion,
18441        __input: &[u8],
18442    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18443        let avail_len = __input.len();
18444        let mut payload_buf = [0; Self::ENCODED_LEN];
18445        let mut buf = if avail_len < Self::ENCODED_LEN {
18446            payload_buf[0..avail_len].copy_from_slice(__input);
18447            Bytes::new(&payload_buf)
18448        } else {
18449            Bytes::new(__input)
18450        };
18451        let mut __struct = Self::default();
18452        __struct.target_system = buf.get_u8();
18453        __struct.target_component = buf.get_u8();
18454        Ok(__struct)
18455    }
18456    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18457        let mut __tmp = BytesMut::new(bytes);
18458        #[allow(clippy::absurd_extreme_comparisons)]
18459        #[allow(unused_comparisons)]
18460        if __tmp.remaining() < Self::ENCODED_LEN {
18461            panic!(
18462                "buffer is too small (need {} bytes, but got {})",
18463                Self::ENCODED_LEN,
18464                __tmp.remaining(),
18465            )
18466        }
18467        __tmp.put_u8(self.target_system);
18468        __tmp.put_u8(self.target_component);
18469        if matches!(version, MavlinkVersion::V2) {
18470            let len = __tmp.len();
18471            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18472        } else {
18473            __tmp.len()
18474        }
18475    }
18476}
18477#[doc = "Request a chunk of a log."]
18478#[doc = ""]
18479#[doc = "ID: 119"]
18480#[derive(Debug, Clone, PartialEq)]
18481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18482#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18483#[cfg_attr(feature = "ts", derive(TS))]
18484#[cfg_attr(feature = "ts", ts(export))]
18485pub struct LOG_REQUEST_DATA_DATA {
18486    #[doc = "Offset into the log"]
18487    pub ofs: u32,
18488    #[doc = "Number of bytes"]
18489    pub count: u32,
18490    #[doc = "Log id (from LOG_ENTRY reply)"]
18491    pub id: u16,
18492    #[doc = "System ID"]
18493    pub target_system: u8,
18494    #[doc = "Component ID"]
18495    pub target_component: u8,
18496}
18497impl LOG_REQUEST_DATA_DATA {
18498    pub const ENCODED_LEN: usize = 12usize;
18499    pub const DEFAULT: Self = Self {
18500        ofs: 0_u32,
18501        count: 0_u32,
18502        id: 0_u16,
18503        target_system: 0_u8,
18504        target_component: 0_u8,
18505    };
18506    #[cfg(feature = "arbitrary")]
18507    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18508        use arbitrary::{Arbitrary, Unstructured};
18509        let mut buf = [0u8; 1024];
18510        rng.fill_bytes(&mut buf);
18511        let mut unstructured = Unstructured::new(&buf);
18512        Self::arbitrary(&mut unstructured).unwrap_or_default()
18513    }
18514}
18515impl Default for LOG_REQUEST_DATA_DATA {
18516    fn default() -> Self {
18517        Self::DEFAULT.clone()
18518    }
18519}
18520impl MessageData for LOG_REQUEST_DATA_DATA {
18521    type Message = MavMessage;
18522    const ID: u32 = 119u32;
18523    const NAME: &'static str = "LOG_REQUEST_DATA";
18524    const EXTRA_CRC: u8 = 116u8;
18525    const ENCODED_LEN: usize = 12usize;
18526    fn deser(
18527        _version: MavlinkVersion,
18528        __input: &[u8],
18529    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18530        let avail_len = __input.len();
18531        let mut payload_buf = [0; Self::ENCODED_LEN];
18532        let mut buf = if avail_len < Self::ENCODED_LEN {
18533            payload_buf[0..avail_len].copy_from_slice(__input);
18534            Bytes::new(&payload_buf)
18535        } else {
18536            Bytes::new(__input)
18537        };
18538        let mut __struct = Self::default();
18539        __struct.ofs = buf.get_u32_le();
18540        __struct.count = buf.get_u32_le();
18541        __struct.id = buf.get_u16_le();
18542        __struct.target_system = buf.get_u8();
18543        __struct.target_component = buf.get_u8();
18544        Ok(__struct)
18545    }
18546    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18547        let mut __tmp = BytesMut::new(bytes);
18548        #[allow(clippy::absurd_extreme_comparisons)]
18549        #[allow(unused_comparisons)]
18550        if __tmp.remaining() < Self::ENCODED_LEN {
18551            panic!(
18552                "buffer is too small (need {} bytes, but got {})",
18553                Self::ENCODED_LEN,
18554                __tmp.remaining(),
18555            )
18556        }
18557        __tmp.put_u32_le(self.ofs);
18558        __tmp.put_u32_le(self.count);
18559        __tmp.put_u16_le(self.id);
18560        __tmp.put_u8(self.target_system);
18561        __tmp.put_u8(self.target_component);
18562        if matches!(version, MavlinkVersion::V2) {
18563            let len = __tmp.len();
18564            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18565        } else {
18566            __tmp.len()
18567        }
18568    }
18569}
18570#[doc = "Stop log transfer and resume normal logging."]
18571#[doc = ""]
18572#[doc = "ID: 122"]
18573#[derive(Debug, Clone, PartialEq)]
18574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18575#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18576#[cfg_attr(feature = "ts", derive(TS))]
18577#[cfg_attr(feature = "ts", ts(export))]
18578pub struct LOG_REQUEST_END_DATA {
18579    #[doc = "System ID"]
18580    pub target_system: u8,
18581    #[doc = "Component ID"]
18582    pub target_component: u8,
18583}
18584impl LOG_REQUEST_END_DATA {
18585    pub const ENCODED_LEN: usize = 2usize;
18586    pub const DEFAULT: Self = Self {
18587        target_system: 0_u8,
18588        target_component: 0_u8,
18589    };
18590    #[cfg(feature = "arbitrary")]
18591    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18592        use arbitrary::{Arbitrary, Unstructured};
18593        let mut buf = [0u8; 1024];
18594        rng.fill_bytes(&mut buf);
18595        let mut unstructured = Unstructured::new(&buf);
18596        Self::arbitrary(&mut unstructured).unwrap_or_default()
18597    }
18598}
18599impl Default for LOG_REQUEST_END_DATA {
18600    fn default() -> Self {
18601        Self::DEFAULT.clone()
18602    }
18603}
18604impl MessageData for LOG_REQUEST_END_DATA {
18605    type Message = MavMessage;
18606    const ID: u32 = 122u32;
18607    const NAME: &'static str = "LOG_REQUEST_END";
18608    const EXTRA_CRC: u8 = 203u8;
18609    const ENCODED_LEN: usize = 2usize;
18610    fn deser(
18611        _version: MavlinkVersion,
18612        __input: &[u8],
18613    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18614        let avail_len = __input.len();
18615        let mut payload_buf = [0; Self::ENCODED_LEN];
18616        let mut buf = if avail_len < Self::ENCODED_LEN {
18617            payload_buf[0..avail_len].copy_from_slice(__input);
18618            Bytes::new(&payload_buf)
18619        } else {
18620            Bytes::new(__input)
18621        };
18622        let mut __struct = Self::default();
18623        __struct.target_system = buf.get_u8();
18624        __struct.target_component = buf.get_u8();
18625        Ok(__struct)
18626    }
18627    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18628        let mut __tmp = BytesMut::new(bytes);
18629        #[allow(clippy::absurd_extreme_comparisons)]
18630        #[allow(unused_comparisons)]
18631        if __tmp.remaining() < Self::ENCODED_LEN {
18632            panic!(
18633                "buffer is too small (need {} bytes, but got {})",
18634                Self::ENCODED_LEN,
18635                __tmp.remaining(),
18636            )
18637        }
18638        __tmp.put_u8(self.target_system);
18639        __tmp.put_u8(self.target_component);
18640        if matches!(version, MavlinkVersion::V2) {
18641            let len = __tmp.len();
18642            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18643        } else {
18644            __tmp.len()
18645        }
18646    }
18647}
18648#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18649#[doc = ""]
18650#[doc = "ID: 117"]
18651#[derive(Debug, Clone, PartialEq)]
18652#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18654#[cfg_attr(feature = "ts", derive(TS))]
18655#[cfg_attr(feature = "ts", ts(export))]
18656pub struct LOG_REQUEST_LIST_DATA {
18657    #[doc = "First log id (0 for first available)"]
18658    pub start: u16,
18659    #[doc = "Last log id (0xffff for last available)"]
18660    pub end: u16,
18661    #[doc = "System ID"]
18662    pub target_system: u8,
18663    #[doc = "Component ID"]
18664    pub target_component: u8,
18665}
18666impl LOG_REQUEST_LIST_DATA {
18667    pub const ENCODED_LEN: usize = 6usize;
18668    pub const DEFAULT: Self = Self {
18669        start: 0_u16,
18670        end: 0_u16,
18671        target_system: 0_u8,
18672        target_component: 0_u8,
18673    };
18674    #[cfg(feature = "arbitrary")]
18675    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18676        use arbitrary::{Arbitrary, Unstructured};
18677        let mut buf = [0u8; 1024];
18678        rng.fill_bytes(&mut buf);
18679        let mut unstructured = Unstructured::new(&buf);
18680        Self::arbitrary(&mut unstructured).unwrap_or_default()
18681    }
18682}
18683impl Default for LOG_REQUEST_LIST_DATA {
18684    fn default() -> Self {
18685        Self::DEFAULT.clone()
18686    }
18687}
18688impl MessageData for LOG_REQUEST_LIST_DATA {
18689    type Message = MavMessage;
18690    const ID: u32 = 117u32;
18691    const NAME: &'static str = "LOG_REQUEST_LIST";
18692    const EXTRA_CRC: u8 = 128u8;
18693    const ENCODED_LEN: usize = 6usize;
18694    fn deser(
18695        _version: MavlinkVersion,
18696        __input: &[u8],
18697    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18698        let avail_len = __input.len();
18699        let mut payload_buf = [0; Self::ENCODED_LEN];
18700        let mut buf = if avail_len < Self::ENCODED_LEN {
18701            payload_buf[0..avail_len].copy_from_slice(__input);
18702            Bytes::new(&payload_buf)
18703        } else {
18704            Bytes::new(__input)
18705        };
18706        let mut __struct = Self::default();
18707        __struct.start = buf.get_u16_le();
18708        __struct.end = buf.get_u16_le();
18709        __struct.target_system = buf.get_u8();
18710        __struct.target_component = buf.get_u8();
18711        Ok(__struct)
18712    }
18713    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18714        let mut __tmp = BytesMut::new(bytes);
18715        #[allow(clippy::absurd_extreme_comparisons)]
18716        #[allow(unused_comparisons)]
18717        if __tmp.remaining() < Self::ENCODED_LEN {
18718            panic!(
18719                "buffer is too small (need {} bytes, but got {})",
18720                Self::ENCODED_LEN,
18721                __tmp.remaining(),
18722            )
18723        }
18724        __tmp.put_u16_le(self.start);
18725        __tmp.put_u16_le(self.end);
18726        __tmp.put_u8(self.target_system);
18727        __tmp.put_u8(self.target_component);
18728        if matches!(version, MavlinkVersion::V2) {
18729            let len = __tmp.len();
18730            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18731        } else {
18732            __tmp.len()
18733        }
18734    }
18735}
18736#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18737#[doc = ""]
18738#[doc = "ID: 192"]
18739#[derive(Debug, Clone, PartialEq)]
18740#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18741#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18742#[cfg_attr(feature = "ts", derive(TS))]
18743#[cfg_attr(feature = "ts", ts(export))]
18744pub struct MAG_CAL_REPORT_DATA {
18745    #[doc = "RMS milligauss residuals."]
18746    pub fitness: f32,
18747    #[doc = "X offset."]
18748    pub ofs_x: f32,
18749    #[doc = "Y offset."]
18750    pub ofs_y: f32,
18751    #[doc = "Z offset."]
18752    pub ofs_z: f32,
18753    #[doc = "X diagonal (matrix 11)."]
18754    pub diag_x: f32,
18755    #[doc = "Y diagonal (matrix 22)."]
18756    pub diag_y: f32,
18757    #[doc = "Z diagonal (matrix 33)."]
18758    pub diag_z: f32,
18759    #[doc = "X off-diagonal (matrix 12 and 21)."]
18760    pub offdiag_x: f32,
18761    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18762    pub offdiag_y: f32,
18763    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18764    pub offdiag_z: f32,
18765    #[doc = "Compass being calibrated."]
18766    pub compass_id: u8,
18767    #[doc = "Bitmask of compasses being calibrated."]
18768    pub cal_mask: u8,
18769    #[doc = "Calibration Status."]
18770    pub cal_status: MagCalStatus,
18771    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18772    pub autosaved: u8,
18773    #[doc = "Confidence in orientation (higher is better)."]
18774    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18775    pub orientation_confidence: f32,
18776    #[doc = "orientation before calibration."]
18777    #[cfg_attr(feature = "serde", serde(default))]
18778    pub old_orientation: MavSensorOrientation,
18779    #[doc = "orientation after calibration."]
18780    #[cfg_attr(feature = "serde", serde(default))]
18781    pub new_orientation: MavSensorOrientation,
18782    #[doc = "field radius correction factor"]
18783    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18784    pub scale_factor: f32,
18785}
18786impl MAG_CAL_REPORT_DATA {
18787    pub const ENCODED_LEN: usize = 54usize;
18788    pub const DEFAULT: Self = Self {
18789        fitness: 0.0_f32,
18790        ofs_x: 0.0_f32,
18791        ofs_y: 0.0_f32,
18792        ofs_z: 0.0_f32,
18793        diag_x: 0.0_f32,
18794        diag_y: 0.0_f32,
18795        diag_z: 0.0_f32,
18796        offdiag_x: 0.0_f32,
18797        offdiag_y: 0.0_f32,
18798        offdiag_z: 0.0_f32,
18799        compass_id: 0_u8,
18800        cal_mask: 0_u8,
18801        cal_status: MagCalStatus::DEFAULT,
18802        autosaved: 0_u8,
18803        orientation_confidence: 0.0_f32,
18804        old_orientation: MavSensorOrientation::DEFAULT,
18805        new_orientation: MavSensorOrientation::DEFAULT,
18806        scale_factor: 0.0_f32,
18807    };
18808    #[cfg(feature = "arbitrary")]
18809    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18810        use arbitrary::{Arbitrary, Unstructured};
18811        let mut buf = [0u8; 1024];
18812        rng.fill_bytes(&mut buf);
18813        let mut unstructured = Unstructured::new(&buf);
18814        Self::arbitrary(&mut unstructured).unwrap_or_default()
18815    }
18816}
18817impl Default for MAG_CAL_REPORT_DATA {
18818    fn default() -> Self {
18819        Self::DEFAULT.clone()
18820    }
18821}
18822impl MessageData for MAG_CAL_REPORT_DATA {
18823    type Message = MavMessage;
18824    const ID: u32 = 192u32;
18825    const NAME: &'static str = "MAG_CAL_REPORT";
18826    const EXTRA_CRC: u8 = 36u8;
18827    const ENCODED_LEN: usize = 54usize;
18828    fn deser(
18829        _version: MavlinkVersion,
18830        __input: &[u8],
18831    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18832        let avail_len = __input.len();
18833        let mut payload_buf = [0; Self::ENCODED_LEN];
18834        let mut buf = if avail_len < Self::ENCODED_LEN {
18835            payload_buf[0..avail_len].copy_from_slice(__input);
18836            Bytes::new(&payload_buf)
18837        } else {
18838            Bytes::new(__input)
18839        };
18840        let mut __struct = Self::default();
18841        __struct.fitness = buf.get_f32_le();
18842        __struct.ofs_x = buf.get_f32_le();
18843        __struct.ofs_y = buf.get_f32_le();
18844        __struct.ofs_z = buf.get_f32_le();
18845        __struct.diag_x = buf.get_f32_le();
18846        __struct.diag_y = buf.get_f32_le();
18847        __struct.diag_z = buf.get_f32_le();
18848        __struct.offdiag_x = buf.get_f32_le();
18849        __struct.offdiag_y = buf.get_f32_le();
18850        __struct.offdiag_z = buf.get_f32_le();
18851        __struct.compass_id = buf.get_u8();
18852        __struct.cal_mask = buf.get_u8();
18853        let tmp = buf.get_u8();
18854        __struct.cal_status =
18855            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18856                enum_type: "MagCalStatus",
18857                value: tmp as u64,
18858            })?;
18859        __struct.autosaved = buf.get_u8();
18860        __struct.orientation_confidence = buf.get_f32_le();
18861        let tmp = buf.get_u8();
18862        __struct.old_orientation =
18863            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18864                enum_type: "MavSensorOrientation",
18865                value: tmp as u64,
18866            })?;
18867        let tmp = buf.get_u8();
18868        __struct.new_orientation =
18869            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18870                enum_type: "MavSensorOrientation",
18871                value: tmp as u64,
18872            })?;
18873        __struct.scale_factor = buf.get_f32_le();
18874        Ok(__struct)
18875    }
18876    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18877        let mut __tmp = BytesMut::new(bytes);
18878        #[allow(clippy::absurd_extreme_comparisons)]
18879        #[allow(unused_comparisons)]
18880        if __tmp.remaining() < Self::ENCODED_LEN {
18881            panic!(
18882                "buffer is too small (need {} bytes, but got {})",
18883                Self::ENCODED_LEN,
18884                __tmp.remaining(),
18885            )
18886        }
18887        __tmp.put_f32_le(self.fitness);
18888        __tmp.put_f32_le(self.ofs_x);
18889        __tmp.put_f32_le(self.ofs_y);
18890        __tmp.put_f32_le(self.ofs_z);
18891        __tmp.put_f32_le(self.diag_x);
18892        __tmp.put_f32_le(self.diag_y);
18893        __tmp.put_f32_le(self.diag_z);
18894        __tmp.put_f32_le(self.offdiag_x);
18895        __tmp.put_f32_le(self.offdiag_y);
18896        __tmp.put_f32_le(self.offdiag_z);
18897        __tmp.put_u8(self.compass_id);
18898        __tmp.put_u8(self.cal_mask);
18899        __tmp.put_u8(self.cal_status as u8);
18900        __tmp.put_u8(self.autosaved);
18901        if matches!(version, MavlinkVersion::V2) {
18902            __tmp.put_f32_le(self.orientation_confidence);
18903            __tmp.put_u8(self.old_orientation as u8);
18904            __tmp.put_u8(self.new_orientation as u8);
18905            __tmp.put_f32_le(self.scale_factor);
18906            let len = __tmp.len();
18907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18908        } else {
18909            __tmp.len()
18910        }
18911    }
18912}
18913#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18914#[doc = ""]
18915#[doc = "ID: 69"]
18916#[derive(Debug, Clone, PartialEq)]
18917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18919#[cfg_attr(feature = "ts", derive(TS))]
18920#[cfg_attr(feature = "ts", ts(export))]
18921pub struct MANUAL_CONTROL_DATA {
18922    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18923    pub x: i16,
18924    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18925    pub y: i16,
18926    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18927    pub z: i16,
18928    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18929    pub r: i16,
18930    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18931    pub buttons: u16,
18932    #[doc = "The system to be controlled."]
18933    pub target: u8,
18934    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18935    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18936    pub buttons2: u16,
18937    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18938    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18939    pub enabled_extensions: u8,
18940    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18941    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18942    pub s: i16,
18943    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18944    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18945    pub t: i16,
18946    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18947    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18948    pub aux1: i16,
18949    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18950    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18951    pub aux2: i16,
18952    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18953    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18954    pub aux3: i16,
18955    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18956    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18957    pub aux4: i16,
18958    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18959    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18960    pub aux5: i16,
18961    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18962    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18963    pub aux6: i16,
18964}
18965impl MANUAL_CONTROL_DATA {
18966    pub const ENCODED_LEN: usize = 30usize;
18967    pub const DEFAULT: Self = Self {
18968        x: 0_i16,
18969        y: 0_i16,
18970        z: 0_i16,
18971        r: 0_i16,
18972        buttons: 0_u16,
18973        target: 0_u8,
18974        buttons2: 0_u16,
18975        enabled_extensions: 0_u8,
18976        s: 0_i16,
18977        t: 0_i16,
18978        aux1: 0_i16,
18979        aux2: 0_i16,
18980        aux3: 0_i16,
18981        aux4: 0_i16,
18982        aux5: 0_i16,
18983        aux6: 0_i16,
18984    };
18985    #[cfg(feature = "arbitrary")]
18986    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18987        use arbitrary::{Arbitrary, Unstructured};
18988        let mut buf = [0u8; 1024];
18989        rng.fill_bytes(&mut buf);
18990        let mut unstructured = Unstructured::new(&buf);
18991        Self::arbitrary(&mut unstructured).unwrap_or_default()
18992    }
18993}
18994impl Default for MANUAL_CONTROL_DATA {
18995    fn default() -> Self {
18996        Self::DEFAULT.clone()
18997    }
18998}
18999impl MessageData for MANUAL_CONTROL_DATA {
19000    type Message = MavMessage;
19001    const ID: u32 = 69u32;
19002    const NAME: &'static str = "MANUAL_CONTROL";
19003    const EXTRA_CRC: u8 = 243u8;
19004    const ENCODED_LEN: usize = 30usize;
19005    fn deser(
19006        _version: MavlinkVersion,
19007        __input: &[u8],
19008    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19009        let avail_len = __input.len();
19010        let mut payload_buf = [0; Self::ENCODED_LEN];
19011        let mut buf = if avail_len < Self::ENCODED_LEN {
19012            payload_buf[0..avail_len].copy_from_slice(__input);
19013            Bytes::new(&payload_buf)
19014        } else {
19015            Bytes::new(__input)
19016        };
19017        let mut __struct = Self::default();
19018        __struct.x = buf.get_i16_le();
19019        __struct.y = buf.get_i16_le();
19020        __struct.z = buf.get_i16_le();
19021        __struct.r = buf.get_i16_le();
19022        __struct.buttons = buf.get_u16_le();
19023        __struct.target = buf.get_u8();
19024        __struct.buttons2 = buf.get_u16_le();
19025        __struct.enabled_extensions = buf.get_u8();
19026        __struct.s = buf.get_i16_le();
19027        __struct.t = buf.get_i16_le();
19028        __struct.aux1 = buf.get_i16_le();
19029        __struct.aux2 = buf.get_i16_le();
19030        __struct.aux3 = buf.get_i16_le();
19031        __struct.aux4 = buf.get_i16_le();
19032        __struct.aux5 = buf.get_i16_le();
19033        __struct.aux6 = buf.get_i16_le();
19034        Ok(__struct)
19035    }
19036    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19037        let mut __tmp = BytesMut::new(bytes);
19038        #[allow(clippy::absurd_extreme_comparisons)]
19039        #[allow(unused_comparisons)]
19040        if __tmp.remaining() < Self::ENCODED_LEN {
19041            panic!(
19042                "buffer is too small (need {} bytes, but got {})",
19043                Self::ENCODED_LEN,
19044                __tmp.remaining(),
19045            )
19046        }
19047        __tmp.put_i16_le(self.x);
19048        __tmp.put_i16_le(self.y);
19049        __tmp.put_i16_le(self.z);
19050        __tmp.put_i16_le(self.r);
19051        __tmp.put_u16_le(self.buttons);
19052        __tmp.put_u8(self.target);
19053        if matches!(version, MavlinkVersion::V2) {
19054            __tmp.put_u16_le(self.buttons2);
19055            __tmp.put_u8(self.enabled_extensions);
19056            __tmp.put_i16_le(self.s);
19057            __tmp.put_i16_le(self.t);
19058            __tmp.put_i16_le(self.aux1);
19059            __tmp.put_i16_le(self.aux2);
19060            __tmp.put_i16_le(self.aux3);
19061            __tmp.put_i16_le(self.aux4);
19062            __tmp.put_i16_le(self.aux5);
19063            __tmp.put_i16_le(self.aux6);
19064            let len = __tmp.len();
19065            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19066        } else {
19067            __tmp.len()
19068        }
19069    }
19070}
19071#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19072#[doc = ""]
19073#[doc = "ID: 81"]
19074#[derive(Debug, Clone, PartialEq)]
19075#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19076#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19077#[cfg_attr(feature = "ts", derive(TS))]
19078#[cfg_attr(feature = "ts", ts(export))]
19079pub struct MANUAL_SETPOINT_DATA {
19080    #[doc = "Timestamp (time since system boot)."]
19081    pub time_boot_ms: u32,
19082    #[doc = "Desired roll rate"]
19083    pub roll: f32,
19084    #[doc = "Desired pitch rate"]
19085    pub pitch: f32,
19086    #[doc = "Desired yaw rate"]
19087    pub yaw: f32,
19088    #[doc = "Collective thrust, normalized to 0 .. 1"]
19089    pub thrust: f32,
19090    #[doc = "Flight mode switch position, 0.. 255"]
19091    pub mode_switch: u8,
19092    #[doc = "Override mode switch position, 0.. 255"]
19093    pub manual_override_switch: u8,
19094}
19095impl MANUAL_SETPOINT_DATA {
19096    pub const ENCODED_LEN: usize = 22usize;
19097    pub const DEFAULT: Self = Self {
19098        time_boot_ms: 0_u32,
19099        roll: 0.0_f32,
19100        pitch: 0.0_f32,
19101        yaw: 0.0_f32,
19102        thrust: 0.0_f32,
19103        mode_switch: 0_u8,
19104        manual_override_switch: 0_u8,
19105    };
19106    #[cfg(feature = "arbitrary")]
19107    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19108        use arbitrary::{Arbitrary, Unstructured};
19109        let mut buf = [0u8; 1024];
19110        rng.fill_bytes(&mut buf);
19111        let mut unstructured = Unstructured::new(&buf);
19112        Self::arbitrary(&mut unstructured).unwrap_or_default()
19113    }
19114}
19115impl Default for MANUAL_SETPOINT_DATA {
19116    fn default() -> Self {
19117        Self::DEFAULT.clone()
19118    }
19119}
19120impl MessageData for MANUAL_SETPOINT_DATA {
19121    type Message = MavMessage;
19122    const ID: u32 = 81u32;
19123    const NAME: &'static str = "MANUAL_SETPOINT";
19124    const EXTRA_CRC: u8 = 106u8;
19125    const ENCODED_LEN: usize = 22usize;
19126    fn deser(
19127        _version: MavlinkVersion,
19128        __input: &[u8],
19129    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19130        let avail_len = __input.len();
19131        let mut payload_buf = [0; Self::ENCODED_LEN];
19132        let mut buf = if avail_len < Self::ENCODED_LEN {
19133            payload_buf[0..avail_len].copy_from_slice(__input);
19134            Bytes::new(&payload_buf)
19135        } else {
19136            Bytes::new(__input)
19137        };
19138        let mut __struct = Self::default();
19139        __struct.time_boot_ms = buf.get_u32_le();
19140        __struct.roll = buf.get_f32_le();
19141        __struct.pitch = buf.get_f32_le();
19142        __struct.yaw = buf.get_f32_le();
19143        __struct.thrust = buf.get_f32_le();
19144        __struct.mode_switch = buf.get_u8();
19145        __struct.manual_override_switch = buf.get_u8();
19146        Ok(__struct)
19147    }
19148    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19149        let mut __tmp = BytesMut::new(bytes);
19150        #[allow(clippy::absurd_extreme_comparisons)]
19151        #[allow(unused_comparisons)]
19152        if __tmp.remaining() < Self::ENCODED_LEN {
19153            panic!(
19154                "buffer is too small (need {} bytes, but got {})",
19155                Self::ENCODED_LEN,
19156                __tmp.remaining(),
19157            )
19158        }
19159        __tmp.put_u32_le(self.time_boot_ms);
19160        __tmp.put_f32_le(self.roll);
19161        __tmp.put_f32_le(self.pitch);
19162        __tmp.put_f32_le(self.yaw);
19163        __tmp.put_f32_le(self.thrust);
19164        __tmp.put_u8(self.mode_switch);
19165        __tmp.put_u8(self.manual_override_switch);
19166        if matches!(version, MavlinkVersion::V2) {
19167            let len = __tmp.len();
19168            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19169        } else {
19170            __tmp.len()
19171        }
19172    }
19173}
19174#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19175#[doc = ""]
19176#[doc = "ID: 249"]
19177#[derive(Debug, Clone, PartialEq)]
19178#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19179#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19180#[cfg_attr(feature = "ts", derive(TS))]
19181#[cfg_attr(feature = "ts", ts(export))]
19182pub struct MEMORY_VECT_DATA {
19183    #[doc = "Starting address of the debug variables"]
19184    pub address: u16,
19185    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19186    pub ver: u8,
19187    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19188    pub mavtype: u8,
19189    #[doc = "Memory contents at specified address"]
19190    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19191    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19192    pub value: [i8; 32],
19193}
19194impl MEMORY_VECT_DATA {
19195    pub const ENCODED_LEN: usize = 36usize;
19196    pub const DEFAULT: Self = Self {
19197        address: 0_u16,
19198        ver: 0_u8,
19199        mavtype: 0_u8,
19200        value: [0_i8; 32usize],
19201    };
19202    #[cfg(feature = "arbitrary")]
19203    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19204        use arbitrary::{Arbitrary, Unstructured};
19205        let mut buf = [0u8; 1024];
19206        rng.fill_bytes(&mut buf);
19207        let mut unstructured = Unstructured::new(&buf);
19208        Self::arbitrary(&mut unstructured).unwrap_or_default()
19209    }
19210}
19211impl Default for MEMORY_VECT_DATA {
19212    fn default() -> Self {
19213        Self::DEFAULT.clone()
19214    }
19215}
19216impl MessageData for MEMORY_VECT_DATA {
19217    type Message = MavMessage;
19218    const ID: u32 = 249u32;
19219    const NAME: &'static str = "MEMORY_VECT";
19220    const EXTRA_CRC: u8 = 204u8;
19221    const ENCODED_LEN: usize = 36usize;
19222    fn deser(
19223        _version: MavlinkVersion,
19224        __input: &[u8],
19225    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19226        let avail_len = __input.len();
19227        let mut payload_buf = [0; Self::ENCODED_LEN];
19228        let mut buf = if avail_len < Self::ENCODED_LEN {
19229            payload_buf[0..avail_len].copy_from_slice(__input);
19230            Bytes::new(&payload_buf)
19231        } else {
19232            Bytes::new(__input)
19233        };
19234        let mut __struct = Self::default();
19235        __struct.address = buf.get_u16_le();
19236        __struct.ver = buf.get_u8();
19237        __struct.mavtype = buf.get_u8();
19238        for v in &mut __struct.value {
19239            let val = buf.get_i8();
19240            *v = val;
19241        }
19242        Ok(__struct)
19243    }
19244    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19245        let mut __tmp = BytesMut::new(bytes);
19246        #[allow(clippy::absurd_extreme_comparisons)]
19247        #[allow(unused_comparisons)]
19248        if __tmp.remaining() < Self::ENCODED_LEN {
19249            panic!(
19250                "buffer is too small (need {} bytes, but got {})",
19251                Self::ENCODED_LEN,
19252                __tmp.remaining(),
19253            )
19254        }
19255        __tmp.put_u16_le(self.address);
19256        __tmp.put_u8(self.ver);
19257        __tmp.put_u8(self.mavtype);
19258        for val in &self.value {
19259            __tmp.put_i8(*val);
19260        }
19261        if matches!(version, MavlinkVersion::V2) {
19262            let len = __tmp.len();
19263            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19264        } else {
19265            __tmp.len()
19266        }
19267    }
19268}
19269#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19270#[doc = ""]
19271#[doc = "ID: 244"]
19272#[derive(Debug, Clone, PartialEq)]
19273#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19274#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19275#[cfg_attr(feature = "ts", derive(TS))]
19276#[cfg_attr(feature = "ts", ts(export))]
19277pub struct MESSAGE_INTERVAL_DATA {
19278    #[doc = "0 indicates the interval at which it is sent."]
19279    pub interval_us: i32,
19280    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19281    pub message_id: u16,
19282}
19283impl MESSAGE_INTERVAL_DATA {
19284    pub const ENCODED_LEN: usize = 6usize;
19285    pub const DEFAULT: Self = Self {
19286        interval_us: 0_i32,
19287        message_id: 0_u16,
19288    };
19289    #[cfg(feature = "arbitrary")]
19290    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19291        use arbitrary::{Arbitrary, Unstructured};
19292        let mut buf = [0u8; 1024];
19293        rng.fill_bytes(&mut buf);
19294        let mut unstructured = Unstructured::new(&buf);
19295        Self::arbitrary(&mut unstructured).unwrap_or_default()
19296    }
19297}
19298impl Default for MESSAGE_INTERVAL_DATA {
19299    fn default() -> Self {
19300        Self::DEFAULT.clone()
19301    }
19302}
19303impl MessageData for MESSAGE_INTERVAL_DATA {
19304    type Message = MavMessage;
19305    const ID: u32 = 244u32;
19306    const NAME: &'static str = "MESSAGE_INTERVAL";
19307    const EXTRA_CRC: u8 = 95u8;
19308    const ENCODED_LEN: usize = 6usize;
19309    fn deser(
19310        _version: MavlinkVersion,
19311        __input: &[u8],
19312    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19313        let avail_len = __input.len();
19314        let mut payload_buf = [0; Self::ENCODED_LEN];
19315        let mut buf = if avail_len < Self::ENCODED_LEN {
19316            payload_buf[0..avail_len].copy_from_slice(__input);
19317            Bytes::new(&payload_buf)
19318        } else {
19319            Bytes::new(__input)
19320        };
19321        let mut __struct = Self::default();
19322        __struct.interval_us = buf.get_i32_le();
19323        __struct.message_id = buf.get_u16_le();
19324        Ok(__struct)
19325    }
19326    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19327        let mut __tmp = BytesMut::new(bytes);
19328        #[allow(clippy::absurd_extreme_comparisons)]
19329        #[allow(unused_comparisons)]
19330        if __tmp.remaining() < Self::ENCODED_LEN {
19331            panic!(
19332                "buffer is too small (need {} bytes, but got {})",
19333                Self::ENCODED_LEN,
19334                __tmp.remaining(),
19335            )
19336        }
19337        __tmp.put_i32_le(self.interval_us);
19338        __tmp.put_u16_le(self.message_id);
19339        if matches!(version, MavlinkVersion::V2) {
19340            let len = __tmp.len();
19341            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19342        } else {
19343            __tmp.len()
19344        }
19345    }
19346}
19347#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19348#[doc = ""]
19349#[doc = "ID: 47"]
19350#[derive(Debug, Clone, PartialEq)]
19351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19352#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19353#[cfg_attr(feature = "ts", derive(TS))]
19354#[cfg_attr(feature = "ts", ts(export))]
19355pub struct MISSION_ACK_DATA {
19356    #[doc = "System ID"]
19357    pub target_system: u8,
19358    #[doc = "Component ID"]
19359    pub target_component: u8,
19360    #[doc = "Mission result."]
19361    pub mavtype: MavMissionResult,
19362    #[doc = "Mission type."]
19363    #[cfg_attr(feature = "serde", serde(default))]
19364    pub mission_type: MavMissionType,
19365    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19366    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19367    pub opaque_id: u32,
19368}
19369impl MISSION_ACK_DATA {
19370    pub const ENCODED_LEN: usize = 8usize;
19371    pub const DEFAULT: Self = Self {
19372        target_system: 0_u8,
19373        target_component: 0_u8,
19374        mavtype: MavMissionResult::DEFAULT,
19375        mission_type: MavMissionType::DEFAULT,
19376        opaque_id: 0_u32,
19377    };
19378    #[cfg(feature = "arbitrary")]
19379    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19380        use arbitrary::{Arbitrary, Unstructured};
19381        let mut buf = [0u8; 1024];
19382        rng.fill_bytes(&mut buf);
19383        let mut unstructured = Unstructured::new(&buf);
19384        Self::arbitrary(&mut unstructured).unwrap_or_default()
19385    }
19386}
19387impl Default for MISSION_ACK_DATA {
19388    fn default() -> Self {
19389        Self::DEFAULT.clone()
19390    }
19391}
19392impl MessageData for MISSION_ACK_DATA {
19393    type Message = MavMessage;
19394    const ID: u32 = 47u32;
19395    const NAME: &'static str = "MISSION_ACK";
19396    const EXTRA_CRC: u8 = 153u8;
19397    const ENCODED_LEN: usize = 8usize;
19398    fn deser(
19399        _version: MavlinkVersion,
19400        __input: &[u8],
19401    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19402        let avail_len = __input.len();
19403        let mut payload_buf = [0; Self::ENCODED_LEN];
19404        let mut buf = if avail_len < Self::ENCODED_LEN {
19405            payload_buf[0..avail_len].copy_from_slice(__input);
19406            Bytes::new(&payload_buf)
19407        } else {
19408            Bytes::new(__input)
19409        };
19410        let mut __struct = Self::default();
19411        __struct.target_system = buf.get_u8();
19412        __struct.target_component = buf.get_u8();
19413        let tmp = buf.get_u8();
19414        __struct.mavtype =
19415            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19416                enum_type: "MavMissionResult",
19417                value: tmp as u64,
19418            })?;
19419        let tmp = buf.get_u8();
19420        __struct.mission_type =
19421            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19422                enum_type: "MavMissionType",
19423                value: tmp as u64,
19424            })?;
19425        __struct.opaque_id = buf.get_u32_le();
19426        Ok(__struct)
19427    }
19428    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19429        let mut __tmp = BytesMut::new(bytes);
19430        #[allow(clippy::absurd_extreme_comparisons)]
19431        #[allow(unused_comparisons)]
19432        if __tmp.remaining() < Self::ENCODED_LEN {
19433            panic!(
19434                "buffer is too small (need {} bytes, but got {})",
19435                Self::ENCODED_LEN,
19436                __tmp.remaining(),
19437            )
19438        }
19439        __tmp.put_u8(self.target_system);
19440        __tmp.put_u8(self.target_component);
19441        __tmp.put_u8(self.mavtype as u8);
19442        if matches!(version, MavlinkVersion::V2) {
19443            __tmp.put_u8(self.mission_type as u8);
19444            __tmp.put_u32_le(self.opaque_id);
19445            let len = __tmp.len();
19446            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19447        } else {
19448            __tmp.len()
19449        }
19450    }
19451}
19452#[doc = "Delete all mission items at once."]
19453#[doc = ""]
19454#[doc = "ID: 45"]
19455#[derive(Debug, Clone, PartialEq)]
19456#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19457#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19458#[cfg_attr(feature = "ts", derive(TS))]
19459#[cfg_attr(feature = "ts", ts(export))]
19460pub struct MISSION_CLEAR_ALL_DATA {
19461    #[doc = "System ID"]
19462    pub target_system: u8,
19463    #[doc = "Component ID"]
19464    pub target_component: u8,
19465    #[doc = "Mission type."]
19466    #[cfg_attr(feature = "serde", serde(default))]
19467    pub mission_type: MavMissionType,
19468}
19469impl MISSION_CLEAR_ALL_DATA {
19470    pub const ENCODED_LEN: usize = 3usize;
19471    pub const DEFAULT: Self = Self {
19472        target_system: 0_u8,
19473        target_component: 0_u8,
19474        mission_type: MavMissionType::DEFAULT,
19475    };
19476    #[cfg(feature = "arbitrary")]
19477    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19478        use arbitrary::{Arbitrary, Unstructured};
19479        let mut buf = [0u8; 1024];
19480        rng.fill_bytes(&mut buf);
19481        let mut unstructured = Unstructured::new(&buf);
19482        Self::arbitrary(&mut unstructured).unwrap_or_default()
19483    }
19484}
19485impl Default for MISSION_CLEAR_ALL_DATA {
19486    fn default() -> Self {
19487        Self::DEFAULT.clone()
19488    }
19489}
19490impl MessageData for MISSION_CLEAR_ALL_DATA {
19491    type Message = MavMessage;
19492    const ID: u32 = 45u32;
19493    const NAME: &'static str = "MISSION_CLEAR_ALL";
19494    const EXTRA_CRC: u8 = 232u8;
19495    const ENCODED_LEN: usize = 3usize;
19496    fn deser(
19497        _version: MavlinkVersion,
19498        __input: &[u8],
19499    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19500        let avail_len = __input.len();
19501        let mut payload_buf = [0; Self::ENCODED_LEN];
19502        let mut buf = if avail_len < Self::ENCODED_LEN {
19503            payload_buf[0..avail_len].copy_from_slice(__input);
19504            Bytes::new(&payload_buf)
19505        } else {
19506            Bytes::new(__input)
19507        };
19508        let mut __struct = Self::default();
19509        __struct.target_system = buf.get_u8();
19510        __struct.target_component = buf.get_u8();
19511        let tmp = buf.get_u8();
19512        __struct.mission_type =
19513            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19514                enum_type: "MavMissionType",
19515                value: tmp as u64,
19516            })?;
19517        Ok(__struct)
19518    }
19519    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19520        let mut __tmp = BytesMut::new(bytes);
19521        #[allow(clippy::absurd_extreme_comparisons)]
19522        #[allow(unused_comparisons)]
19523        if __tmp.remaining() < Self::ENCODED_LEN {
19524            panic!(
19525                "buffer is too small (need {} bytes, but got {})",
19526                Self::ENCODED_LEN,
19527                __tmp.remaining(),
19528            )
19529        }
19530        __tmp.put_u8(self.target_system);
19531        __tmp.put_u8(self.target_component);
19532        if matches!(version, MavlinkVersion::V2) {
19533            __tmp.put_u8(self.mission_type as u8);
19534            let len = __tmp.len();
19535            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19536        } else {
19537            __tmp.len()
19538        }
19539    }
19540}
19541#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19542#[doc = ""]
19543#[doc = "ID: 44"]
19544#[derive(Debug, Clone, PartialEq)]
19545#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19546#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19547#[cfg_attr(feature = "ts", derive(TS))]
19548#[cfg_attr(feature = "ts", ts(export))]
19549pub struct MISSION_COUNT_DATA {
19550    #[doc = "Number of mission items in the sequence"]
19551    pub count: u16,
19552    #[doc = "System ID"]
19553    pub target_system: u8,
19554    #[doc = "Component ID"]
19555    pub target_component: u8,
19556    #[doc = "Mission type."]
19557    #[cfg_attr(feature = "serde", serde(default))]
19558    pub mission_type: MavMissionType,
19559    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19560    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19561    pub opaque_id: u32,
19562}
19563impl MISSION_COUNT_DATA {
19564    pub const ENCODED_LEN: usize = 9usize;
19565    pub const DEFAULT: Self = Self {
19566        count: 0_u16,
19567        target_system: 0_u8,
19568        target_component: 0_u8,
19569        mission_type: MavMissionType::DEFAULT,
19570        opaque_id: 0_u32,
19571    };
19572    #[cfg(feature = "arbitrary")]
19573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19574        use arbitrary::{Arbitrary, Unstructured};
19575        let mut buf = [0u8; 1024];
19576        rng.fill_bytes(&mut buf);
19577        let mut unstructured = Unstructured::new(&buf);
19578        Self::arbitrary(&mut unstructured).unwrap_or_default()
19579    }
19580}
19581impl Default for MISSION_COUNT_DATA {
19582    fn default() -> Self {
19583        Self::DEFAULT.clone()
19584    }
19585}
19586impl MessageData for MISSION_COUNT_DATA {
19587    type Message = MavMessage;
19588    const ID: u32 = 44u32;
19589    const NAME: &'static str = "MISSION_COUNT";
19590    const EXTRA_CRC: u8 = 221u8;
19591    const ENCODED_LEN: usize = 9usize;
19592    fn deser(
19593        _version: MavlinkVersion,
19594        __input: &[u8],
19595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19596        let avail_len = __input.len();
19597        let mut payload_buf = [0; Self::ENCODED_LEN];
19598        let mut buf = if avail_len < Self::ENCODED_LEN {
19599            payload_buf[0..avail_len].copy_from_slice(__input);
19600            Bytes::new(&payload_buf)
19601        } else {
19602            Bytes::new(__input)
19603        };
19604        let mut __struct = Self::default();
19605        __struct.count = buf.get_u16_le();
19606        __struct.target_system = buf.get_u8();
19607        __struct.target_component = buf.get_u8();
19608        let tmp = buf.get_u8();
19609        __struct.mission_type =
19610            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19611                enum_type: "MavMissionType",
19612                value: tmp as u64,
19613            })?;
19614        __struct.opaque_id = buf.get_u32_le();
19615        Ok(__struct)
19616    }
19617    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19618        let mut __tmp = BytesMut::new(bytes);
19619        #[allow(clippy::absurd_extreme_comparisons)]
19620        #[allow(unused_comparisons)]
19621        if __tmp.remaining() < Self::ENCODED_LEN {
19622            panic!(
19623                "buffer is too small (need {} bytes, but got {})",
19624                Self::ENCODED_LEN,
19625                __tmp.remaining(),
19626            )
19627        }
19628        __tmp.put_u16_le(self.count);
19629        __tmp.put_u8(self.target_system);
19630        __tmp.put_u8(self.target_component);
19631        if matches!(version, MavlinkVersion::V2) {
19632            __tmp.put_u8(self.mission_type as u8);
19633            __tmp.put_u32_le(self.opaque_id);
19634            let len = __tmp.len();
19635            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19636        } else {
19637            __tmp.len()
19638        }
19639    }
19640}
19641#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19642#[doc = ""]
19643#[doc = "ID: 42"]
19644#[derive(Debug, Clone, PartialEq)]
19645#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19647#[cfg_attr(feature = "ts", derive(TS))]
19648#[cfg_attr(feature = "ts", ts(export))]
19649pub struct MISSION_CURRENT_DATA {
19650    #[doc = "Sequence"]
19651    pub seq: u16,
19652    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19653    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19654    pub total: u16,
19655    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19656    #[cfg_attr(feature = "serde", serde(default))]
19657    pub mission_state: MissionState,
19658    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19659    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19660    pub mission_mode: u8,
19661    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19662    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19663    pub mission_id: u32,
19664    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19665    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19666    pub fence_id: u32,
19667    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19668    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19669    pub rally_points_id: u32,
19670}
19671impl MISSION_CURRENT_DATA {
19672    pub const ENCODED_LEN: usize = 18usize;
19673    pub const DEFAULT: Self = Self {
19674        seq: 0_u16,
19675        total: 0_u16,
19676        mission_state: MissionState::DEFAULT,
19677        mission_mode: 0_u8,
19678        mission_id: 0_u32,
19679        fence_id: 0_u32,
19680        rally_points_id: 0_u32,
19681    };
19682    #[cfg(feature = "arbitrary")]
19683    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19684        use arbitrary::{Arbitrary, Unstructured};
19685        let mut buf = [0u8; 1024];
19686        rng.fill_bytes(&mut buf);
19687        let mut unstructured = Unstructured::new(&buf);
19688        Self::arbitrary(&mut unstructured).unwrap_or_default()
19689    }
19690}
19691impl Default for MISSION_CURRENT_DATA {
19692    fn default() -> Self {
19693        Self::DEFAULT.clone()
19694    }
19695}
19696impl MessageData for MISSION_CURRENT_DATA {
19697    type Message = MavMessage;
19698    const ID: u32 = 42u32;
19699    const NAME: &'static str = "MISSION_CURRENT";
19700    const EXTRA_CRC: u8 = 28u8;
19701    const ENCODED_LEN: usize = 18usize;
19702    fn deser(
19703        _version: MavlinkVersion,
19704        __input: &[u8],
19705    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19706        let avail_len = __input.len();
19707        let mut payload_buf = [0; Self::ENCODED_LEN];
19708        let mut buf = if avail_len < Self::ENCODED_LEN {
19709            payload_buf[0..avail_len].copy_from_slice(__input);
19710            Bytes::new(&payload_buf)
19711        } else {
19712            Bytes::new(__input)
19713        };
19714        let mut __struct = Self::default();
19715        __struct.seq = buf.get_u16_le();
19716        __struct.total = buf.get_u16_le();
19717        let tmp = buf.get_u8();
19718        __struct.mission_state =
19719            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19720                enum_type: "MissionState",
19721                value: tmp as u64,
19722            })?;
19723        __struct.mission_mode = buf.get_u8();
19724        __struct.mission_id = buf.get_u32_le();
19725        __struct.fence_id = buf.get_u32_le();
19726        __struct.rally_points_id = buf.get_u32_le();
19727        Ok(__struct)
19728    }
19729    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19730        let mut __tmp = BytesMut::new(bytes);
19731        #[allow(clippy::absurd_extreme_comparisons)]
19732        #[allow(unused_comparisons)]
19733        if __tmp.remaining() < Self::ENCODED_LEN {
19734            panic!(
19735                "buffer is too small (need {} bytes, but got {})",
19736                Self::ENCODED_LEN,
19737                __tmp.remaining(),
19738            )
19739        }
19740        __tmp.put_u16_le(self.seq);
19741        if matches!(version, MavlinkVersion::V2) {
19742            __tmp.put_u16_le(self.total);
19743            __tmp.put_u8(self.mission_state as u8);
19744            __tmp.put_u8(self.mission_mode);
19745            __tmp.put_u32_le(self.mission_id);
19746            __tmp.put_u32_le(self.fence_id);
19747            __tmp.put_u32_le(self.rally_points_id);
19748            let len = __tmp.len();
19749            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19750        } else {
19751            __tmp.len()
19752        }
19753    }
19754}
19755#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19756#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19757#[doc = ""]
19758#[doc = "ID: 39"]
19759#[derive(Debug, Clone, PartialEq)]
19760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19762#[cfg_attr(feature = "ts", derive(TS))]
19763#[cfg_attr(feature = "ts", ts(export))]
19764pub struct MISSION_ITEM_DATA {
19765    #[doc = "PARAM1, see MAV_CMD enum"]
19766    pub param1: f32,
19767    #[doc = "PARAM2, see MAV_CMD enum"]
19768    pub param2: f32,
19769    #[doc = "PARAM3, see MAV_CMD enum"]
19770    pub param3: f32,
19771    #[doc = "PARAM4, see MAV_CMD enum"]
19772    pub param4: f32,
19773    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19774    pub x: f32,
19775    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19776    pub y: f32,
19777    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19778    pub z: f32,
19779    #[doc = "Sequence"]
19780    pub seq: u16,
19781    #[doc = "The scheduled action for the waypoint."]
19782    pub command: MavCmd,
19783    #[doc = "System ID"]
19784    pub target_system: u8,
19785    #[doc = "Component ID"]
19786    pub target_component: u8,
19787    #[doc = "The coordinate system of the waypoint."]
19788    pub frame: MavFrame,
19789    #[doc = "false:0, true:1"]
19790    pub current: u8,
19791    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19792    pub autocontinue: u8,
19793    #[doc = "Mission type."]
19794    #[cfg_attr(feature = "serde", serde(default))]
19795    pub mission_type: MavMissionType,
19796}
19797impl MISSION_ITEM_DATA {
19798    pub const ENCODED_LEN: usize = 38usize;
19799    pub const DEFAULT: Self = Self {
19800        param1: 0.0_f32,
19801        param2: 0.0_f32,
19802        param3: 0.0_f32,
19803        param4: 0.0_f32,
19804        x: 0.0_f32,
19805        y: 0.0_f32,
19806        z: 0.0_f32,
19807        seq: 0_u16,
19808        command: MavCmd::DEFAULT,
19809        target_system: 0_u8,
19810        target_component: 0_u8,
19811        frame: MavFrame::DEFAULT,
19812        current: 0_u8,
19813        autocontinue: 0_u8,
19814        mission_type: MavMissionType::DEFAULT,
19815    };
19816    #[cfg(feature = "arbitrary")]
19817    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19818        use arbitrary::{Arbitrary, Unstructured};
19819        let mut buf = [0u8; 1024];
19820        rng.fill_bytes(&mut buf);
19821        let mut unstructured = Unstructured::new(&buf);
19822        Self::arbitrary(&mut unstructured).unwrap_or_default()
19823    }
19824}
19825impl Default for MISSION_ITEM_DATA {
19826    fn default() -> Self {
19827        Self::DEFAULT.clone()
19828    }
19829}
19830impl MessageData for MISSION_ITEM_DATA {
19831    type Message = MavMessage;
19832    const ID: u32 = 39u32;
19833    const NAME: &'static str = "MISSION_ITEM";
19834    const EXTRA_CRC: u8 = 254u8;
19835    const ENCODED_LEN: usize = 38usize;
19836    fn deser(
19837        _version: MavlinkVersion,
19838        __input: &[u8],
19839    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19840        let avail_len = __input.len();
19841        let mut payload_buf = [0; Self::ENCODED_LEN];
19842        let mut buf = if avail_len < Self::ENCODED_LEN {
19843            payload_buf[0..avail_len].copy_from_slice(__input);
19844            Bytes::new(&payload_buf)
19845        } else {
19846            Bytes::new(__input)
19847        };
19848        let mut __struct = Self::default();
19849        __struct.param1 = buf.get_f32_le();
19850        __struct.param2 = buf.get_f32_le();
19851        __struct.param3 = buf.get_f32_le();
19852        __struct.param4 = buf.get_f32_le();
19853        __struct.x = buf.get_f32_le();
19854        __struct.y = buf.get_f32_le();
19855        __struct.z = buf.get_f32_le();
19856        __struct.seq = buf.get_u16_le();
19857        let tmp = buf.get_u16_le();
19858        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19859            ::mavlink_core::error::ParserError::InvalidEnum {
19860                enum_type: "MavCmd",
19861                value: tmp as u64,
19862            },
19863        )?;
19864        __struct.target_system = buf.get_u8();
19865        __struct.target_component = buf.get_u8();
19866        let tmp = buf.get_u8();
19867        __struct.frame =
19868            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19869                enum_type: "MavFrame",
19870                value: tmp as u64,
19871            })?;
19872        __struct.current = buf.get_u8();
19873        __struct.autocontinue = buf.get_u8();
19874        let tmp = buf.get_u8();
19875        __struct.mission_type =
19876            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19877                enum_type: "MavMissionType",
19878                value: tmp as u64,
19879            })?;
19880        Ok(__struct)
19881    }
19882    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19883        let mut __tmp = BytesMut::new(bytes);
19884        #[allow(clippy::absurd_extreme_comparisons)]
19885        #[allow(unused_comparisons)]
19886        if __tmp.remaining() < Self::ENCODED_LEN {
19887            panic!(
19888                "buffer is too small (need {} bytes, but got {})",
19889                Self::ENCODED_LEN,
19890                __tmp.remaining(),
19891            )
19892        }
19893        __tmp.put_f32_le(self.param1);
19894        __tmp.put_f32_le(self.param2);
19895        __tmp.put_f32_le(self.param3);
19896        __tmp.put_f32_le(self.param4);
19897        __tmp.put_f32_le(self.x);
19898        __tmp.put_f32_le(self.y);
19899        __tmp.put_f32_le(self.z);
19900        __tmp.put_u16_le(self.seq);
19901        __tmp.put_u16_le(self.command as u16);
19902        __tmp.put_u8(self.target_system);
19903        __tmp.put_u8(self.target_component);
19904        __tmp.put_u8(self.frame as u8);
19905        __tmp.put_u8(self.current);
19906        __tmp.put_u8(self.autocontinue);
19907        if matches!(version, MavlinkVersion::V2) {
19908            __tmp.put_u8(self.mission_type as u8);
19909            let len = __tmp.len();
19910            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19911        } else {
19912            __tmp.len()
19913        }
19914    }
19915}
19916#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19917#[doc = ""]
19918#[doc = "ID: 73"]
19919#[derive(Debug, Clone, PartialEq)]
19920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19922#[cfg_attr(feature = "ts", derive(TS))]
19923#[cfg_attr(feature = "ts", ts(export))]
19924pub struct MISSION_ITEM_INT_DATA {
19925    #[doc = "PARAM1, see MAV_CMD enum"]
19926    pub param1: f32,
19927    #[doc = "PARAM2, see MAV_CMD enum"]
19928    pub param2: f32,
19929    #[doc = "PARAM3, see MAV_CMD enum"]
19930    pub param3: f32,
19931    #[doc = "PARAM4, see MAV_CMD enum"]
19932    pub param4: f32,
19933    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19934    pub x: i32,
19935    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19936    pub y: i32,
19937    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19938    pub z: f32,
19939    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19940    pub seq: u16,
19941    #[doc = "The scheduled action for the waypoint."]
19942    pub command: MavCmd,
19943    #[doc = "System ID"]
19944    pub target_system: u8,
19945    #[doc = "Component ID"]
19946    pub target_component: u8,
19947    #[doc = "The coordinate system of the waypoint."]
19948    pub frame: MavFrame,
19949    #[doc = "false:0, true:1"]
19950    pub current: u8,
19951    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19952    pub autocontinue: u8,
19953    #[doc = "Mission type."]
19954    #[cfg_attr(feature = "serde", serde(default))]
19955    pub mission_type: MavMissionType,
19956}
19957impl MISSION_ITEM_INT_DATA {
19958    pub const ENCODED_LEN: usize = 38usize;
19959    pub const DEFAULT: Self = Self {
19960        param1: 0.0_f32,
19961        param2: 0.0_f32,
19962        param3: 0.0_f32,
19963        param4: 0.0_f32,
19964        x: 0_i32,
19965        y: 0_i32,
19966        z: 0.0_f32,
19967        seq: 0_u16,
19968        command: MavCmd::DEFAULT,
19969        target_system: 0_u8,
19970        target_component: 0_u8,
19971        frame: MavFrame::DEFAULT,
19972        current: 0_u8,
19973        autocontinue: 0_u8,
19974        mission_type: MavMissionType::DEFAULT,
19975    };
19976    #[cfg(feature = "arbitrary")]
19977    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19978        use arbitrary::{Arbitrary, Unstructured};
19979        let mut buf = [0u8; 1024];
19980        rng.fill_bytes(&mut buf);
19981        let mut unstructured = Unstructured::new(&buf);
19982        Self::arbitrary(&mut unstructured).unwrap_or_default()
19983    }
19984}
19985impl Default for MISSION_ITEM_INT_DATA {
19986    fn default() -> Self {
19987        Self::DEFAULT.clone()
19988    }
19989}
19990impl MessageData for MISSION_ITEM_INT_DATA {
19991    type Message = MavMessage;
19992    const ID: u32 = 73u32;
19993    const NAME: &'static str = "MISSION_ITEM_INT";
19994    const EXTRA_CRC: u8 = 38u8;
19995    const ENCODED_LEN: usize = 38usize;
19996    fn deser(
19997        _version: MavlinkVersion,
19998        __input: &[u8],
19999    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20000        let avail_len = __input.len();
20001        let mut payload_buf = [0; Self::ENCODED_LEN];
20002        let mut buf = if avail_len < Self::ENCODED_LEN {
20003            payload_buf[0..avail_len].copy_from_slice(__input);
20004            Bytes::new(&payload_buf)
20005        } else {
20006            Bytes::new(__input)
20007        };
20008        let mut __struct = Self::default();
20009        __struct.param1 = buf.get_f32_le();
20010        __struct.param2 = buf.get_f32_le();
20011        __struct.param3 = buf.get_f32_le();
20012        __struct.param4 = buf.get_f32_le();
20013        __struct.x = buf.get_i32_le();
20014        __struct.y = buf.get_i32_le();
20015        __struct.z = buf.get_f32_le();
20016        __struct.seq = buf.get_u16_le();
20017        let tmp = buf.get_u16_le();
20018        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20019            ::mavlink_core::error::ParserError::InvalidEnum {
20020                enum_type: "MavCmd",
20021                value: tmp as u64,
20022            },
20023        )?;
20024        __struct.target_system = buf.get_u8();
20025        __struct.target_component = buf.get_u8();
20026        let tmp = buf.get_u8();
20027        __struct.frame =
20028            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20029                enum_type: "MavFrame",
20030                value: tmp as u64,
20031            })?;
20032        __struct.current = buf.get_u8();
20033        __struct.autocontinue = buf.get_u8();
20034        let tmp = buf.get_u8();
20035        __struct.mission_type =
20036            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20037                enum_type: "MavMissionType",
20038                value: tmp as u64,
20039            })?;
20040        Ok(__struct)
20041    }
20042    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20043        let mut __tmp = BytesMut::new(bytes);
20044        #[allow(clippy::absurd_extreme_comparisons)]
20045        #[allow(unused_comparisons)]
20046        if __tmp.remaining() < Self::ENCODED_LEN {
20047            panic!(
20048                "buffer is too small (need {} bytes, but got {})",
20049                Self::ENCODED_LEN,
20050                __tmp.remaining(),
20051            )
20052        }
20053        __tmp.put_f32_le(self.param1);
20054        __tmp.put_f32_le(self.param2);
20055        __tmp.put_f32_le(self.param3);
20056        __tmp.put_f32_le(self.param4);
20057        __tmp.put_i32_le(self.x);
20058        __tmp.put_i32_le(self.y);
20059        __tmp.put_f32_le(self.z);
20060        __tmp.put_u16_le(self.seq);
20061        __tmp.put_u16_le(self.command as u16);
20062        __tmp.put_u8(self.target_system);
20063        __tmp.put_u8(self.target_component);
20064        __tmp.put_u8(self.frame as u8);
20065        __tmp.put_u8(self.current);
20066        __tmp.put_u8(self.autocontinue);
20067        if matches!(version, MavlinkVersion::V2) {
20068            __tmp.put_u8(self.mission_type as u8);
20069            let len = __tmp.len();
20070            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20071        } else {
20072            __tmp.len()
20073        }
20074    }
20075}
20076#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20077#[doc = ""]
20078#[doc = "ID: 46"]
20079#[derive(Debug, Clone, PartialEq)]
20080#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20081#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20082#[cfg_attr(feature = "ts", derive(TS))]
20083#[cfg_attr(feature = "ts", ts(export))]
20084pub struct MISSION_ITEM_REACHED_DATA {
20085    #[doc = "Sequence"]
20086    pub seq: u16,
20087}
20088impl MISSION_ITEM_REACHED_DATA {
20089    pub const ENCODED_LEN: usize = 2usize;
20090    pub const DEFAULT: Self = Self { seq: 0_u16 };
20091    #[cfg(feature = "arbitrary")]
20092    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20093        use arbitrary::{Arbitrary, Unstructured};
20094        let mut buf = [0u8; 1024];
20095        rng.fill_bytes(&mut buf);
20096        let mut unstructured = Unstructured::new(&buf);
20097        Self::arbitrary(&mut unstructured).unwrap_or_default()
20098    }
20099}
20100impl Default for MISSION_ITEM_REACHED_DATA {
20101    fn default() -> Self {
20102        Self::DEFAULT.clone()
20103    }
20104}
20105impl MessageData for MISSION_ITEM_REACHED_DATA {
20106    type Message = MavMessage;
20107    const ID: u32 = 46u32;
20108    const NAME: &'static str = "MISSION_ITEM_REACHED";
20109    const EXTRA_CRC: u8 = 11u8;
20110    const ENCODED_LEN: usize = 2usize;
20111    fn deser(
20112        _version: MavlinkVersion,
20113        __input: &[u8],
20114    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20115        let avail_len = __input.len();
20116        let mut payload_buf = [0; Self::ENCODED_LEN];
20117        let mut buf = if avail_len < Self::ENCODED_LEN {
20118            payload_buf[0..avail_len].copy_from_slice(__input);
20119            Bytes::new(&payload_buf)
20120        } else {
20121            Bytes::new(__input)
20122        };
20123        let mut __struct = Self::default();
20124        __struct.seq = buf.get_u16_le();
20125        Ok(__struct)
20126    }
20127    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20128        let mut __tmp = BytesMut::new(bytes);
20129        #[allow(clippy::absurd_extreme_comparisons)]
20130        #[allow(unused_comparisons)]
20131        if __tmp.remaining() < Self::ENCODED_LEN {
20132            panic!(
20133                "buffer is too small (need {} bytes, but got {})",
20134                Self::ENCODED_LEN,
20135                __tmp.remaining(),
20136            )
20137        }
20138        __tmp.put_u16_le(self.seq);
20139        if matches!(version, MavlinkVersion::V2) {
20140            let len = __tmp.len();
20141            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20142        } else {
20143            __tmp.len()
20144        }
20145    }
20146}
20147#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20148#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20149#[doc = ""]
20150#[doc = "ID: 40"]
20151#[derive(Debug, Clone, PartialEq)]
20152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20153#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20154#[cfg_attr(feature = "ts", derive(TS))]
20155#[cfg_attr(feature = "ts", ts(export))]
20156pub struct MISSION_REQUEST_DATA {
20157    #[doc = "Sequence"]
20158    pub seq: u16,
20159    #[doc = "System ID"]
20160    pub target_system: u8,
20161    #[doc = "Component ID"]
20162    pub target_component: u8,
20163    #[doc = "Mission type."]
20164    #[cfg_attr(feature = "serde", serde(default))]
20165    pub mission_type: MavMissionType,
20166}
20167impl MISSION_REQUEST_DATA {
20168    pub const ENCODED_LEN: usize = 5usize;
20169    pub const DEFAULT: Self = Self {
20170        seq: 0_u16,
20171        target_system: 0_u8,
20172        target_component: 0_u8,
20173        mission_type: MavMissionType::DEFAULT,
20174    };
20175    #[cfg(feature = "arbitrary")]
20176    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20177        use arbitrary::{Arbitrary, Unstructured};
20178        let mut buf = [0u8; 1024];
20179        rng.fill_bytes(&mut buf);
20180        let mut unstructured = Unstructured::new(&buf);
20181        Self::arbitrary(&mut unstructured).unwrap_or_default()
20182    }
20183}
20184impl Default for MISSION_REQUEST_DATA {
20185    fn default() -> Self {
20186        Self::DEFAULT.clone()
20187    }
20188}
20189impl MessageData for MISSION_REQUEST_DATA {
20190    type Message = MavMessage;
20191    const ID: u32 = 40u32;
20192    const NAME: &'static str = "MISSION_REQUEST";
20193    const EXTRA_CRC: u8 = 230u8;
20194    const ENCODED_LEN: usize = 5usize;
20195    fn deser(
20196        _version: MavlinkVersion,
20197        __input: &[u8],
20198    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20199        let avail_len = __input.len();
20200        let mut payload_buf = [0; Self::ENCODED_LEN];
20201        let mut buf = if avail_len < Self::ENCODED_LEN {
20202            payload_buf[0..avail_len].copy_from_slice(__input);
20203            Bytes::new(&payload_buf)
20204        } else {
20205            Bytes::new(__input)
20206        };
20207        let mut __struct = Self::default();
20208        __struct.seq = buf.get_u16_le();
20209        __struct.target_system = buf.get_u8();
20210        __struct.target_component = buf.get_u8();
20211        let tmp = buf.get_u8();
20212        __struct.mission_type =
20213            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20214                enum_type: "MavMissionType",
20215                value: tmp as u64,
20216            })?;
20217        Ok(__struct)
20218    }
20219    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20220        let mut __tmp = BytesMut::new(bytes);
20221        #[allow(clippy::absurd_extreme_comparisons)]
20222        #[allow(unused_comparisons)]
20223        if __tmp.remaining() < Self::ENCODED_LEN {
20224            panic!(
20225                "buffer is too small (need {} bytes, but got {})",
20226                Self::ENCODED_LEN,
20227                __tmp.remaining(),
20228            )
20229        }
20230        __tmp.put_u16_le(self.seq);
20231        __tmp.put_u8(self.target_system);
20232        __tmp.put_u8(self.target_component);
20233        if matches!(version, MavlinkVersion::V2) {
20234            __tmp.put_u8(self.mission_type as u8);
20235            let len = __tmp.len();
20236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20237        } else {
20238            __tmp.len()
20239        }
20240    }
20241}
20242#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20243#[doc = ""]
20244#[doc = "ID: 51"]
20245#[derive(Debug, Clone, PartialEq)]
20246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20248#[cfg_attr(feature = "ts", derive(TS))]
20249#[cfg_attr(feature = "ts", ts(export))]
20250pub struct MISSION_REQUEST_INT_DATA {
20251    #[doc = "Sequence"]
20252    pub seq: u16,
20253    #[doc = "System ID"]
20254    pub target_system: u8,
20255    #[doc = "Component ID"]
20256    pub target_component: u8,
20257    #[doc = "Mission type."]
20258    #[cfg_attr(feature = "serde", serde(default))]
20259    pub mission_type: MavMissionType,
20260}
20261impl MISSION_REQUEST_INT_DATA {
20262    pub const ENCODED_LEN: usize = 5usize;
20263    pub const DEFAULT: Self = Self {
20264        seq: 0_u16,
20265        target_system: 0_u8,
20266        target_component: 0_u8,
20267        mission_type: MavMissionType::DEFAULT,
20268    };
20269    #[cfg(feature = "arbitrary")]
20270    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20271        use arbitrary::{Arbitrary, Unstructured};
20272        let mut buf = [0u8; 1024];
20273        rng.fill_bytes(&mut buf);
20274        let mut unstructured = Unstructured::new(&buf);
20275        Self::arbitrary(&mut unstructured).unwrap_or_default()
20276    }
20277}
20278impl Default for MISSION_REQUEST_INT_DATA {
20279    fn default() -> Self {
20280        Self::DEFAULT.clone()
20281    }
20282}
20283impl MessageData for MISSION_REQUEST_INT_DATA {
20284    type Message = MavMessage;
20285    const ID: u32 = 51u32;
20286    const NAME: &'static str = "MISSION_REQUEST_INT";
20287    const EXTRA_CRC: u8 = 196u8;
20288    const ENCODED_LEN: usize = 5usize;
20289    fn deser(
20290        _version: MavlinkVersion,
20291        __input: &[u8],
20292    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20293        let avail_len = __input.len();
20294        let mut payload_buf = [0; Self::ENCODED_LEN];
20295        let mut buf = if avail_len < Self::ENCODED_LEN {
20296            payload_buf[0..avail_len].copy_from_slice(__input);
20297            Bytes::new(&payload_buf)
20298        } else {
20299            Bytes::new(__input)
20300        };
20301        let mut __struct = Self::default();
20302        __struct.seq = buf.get_u16_le();
20303        __struct.target_system = buf.get_u8();
20304        __struct.target_component = buf.get_u8();
20305        let tmp = buf.get_u8();
20306        __struct.mission_type =
20307            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20308                enum_type: "MavMissionType",
20309                value: tmp as u64,
20310            })?;
20311        Ok(__struct)
20312    }
20313    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20314        let mut __tmp = BytesMut::new(bytes);
20315        #[allow(clippy::absurd_extreme_comparisons)]
20316        #[allow(unused_comparisons)]
20317        if __tmp.remaining() < Self::ENCODED_LEN {
20318            panic!(
20319                "buffer is too small (need {} bytes, but got {})",
20320                Self::ENCODED_LEN,
20321                __tmp.remaining(),
20322            )
20323        }
20324        __tmp.put_u16_le(self.seq);
20325        __tmp.put_u8(self.target_system);
20326        __tmp.put_u8(self.target_component);
20327        if matches!(version, MavlinkVersion::V2) {
20328            __tmp.put_u8(self.mission_type as u8);
20329            let len = __tmp.len();
20330            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20331        } else {
20332            __tmp.len()
20333        }
20334    }
20335}
20336#[doc = "Request the overall list of mission items from the system/component."]
20337#[doc = ""]
20338#[doc = "ID: 43"]
20339#[derive(Debug, Clone, PartialEq)]
20340#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20342#[cfg_attr(feature = "ts", derive(TS))]
20343#[cfg_attr(feature = "ts", ts(export))]
20344pub struct MISSION_REQUEST_LIST_DATA {
20345    #[doc = "System ID"]
20346    pub target_system: u8,
20347    #[doc = "Component ID"]
20348    pub target_component: u8,
20349    #[doc = "Mission type."]
20350    #[cfg_attr(feature = "serde", serde(default))]
20351    pub mission_type: MavMissionType,
20352}
20353impl MISSION_REQUEST_LIST_DATA {
20354    pub const ENCODED_LEN: usize = 3usize;
20355    pub const DEFAULT: Self = Self {
20356        target_system: 0_u8,
20357        target_component: 0_u8,
20358        mission_type: MavMissionType::DEFAULT,
20359    };
20360    #[cfg(feature = "arbitrary")]
20361    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20362        use arbitrary::{Arbitrary, Unstructured};
20363        let mut buf = [0u8; 1024];
20364        rng.fill_bytes(&mut buf);
20365        let mut unstructured = Unstructured::new(&buf);
20366        Self::arbitrary(&mut unstructured).unwrap_or_default()
20367    }
20368}
20369impl Default for MISSION_REQUEST_LIST_DATA {
20370    fn default() -> Self {
20371        Self::DEFAULT.clone()
20372    }
20373}
20374impl MessageData for MISSION_REQUEST_LIST_DATA {
20375    type Message = MavMessage;
20376    const ID: u32 = 43u32;
20377    const NAME: &'static str = "MISSION_REQUEST_LIST";
20378    const EXTRA_CRC: u8 = 132u8;
20379    const ENCODED_LEN: usize = 3usize;
20380    fn deser(
20381        _version: MavlinkVersion,
20382        __input: &[u8],
20383    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20384        let avail_len = __input.len();
20385        let mut payload_buf = [0; Self::ENCODED_LEN];
20386        let mut buf = if avail_len < Self::ENCODED_LEN {
20387            payload_buf[0..avail_len].copy_from_slice(__input);
20388            Bytes::new(&payload_buf)
20389        } else {
20390            Bytes::new(__input)
20391        };
20392        let mut __struct = Self::default();
20393        __struct.target_system = buf.get_u8();
20394        __struct.target_component = buf.get_u8();
20395        let tmp = buf.get_u8();
20396        __struct.mission_type =
20397            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20398                enum_type: "MavMissionType",
20399                value: tmp as u64,
20400            })?;
20401        Ok(__struct)
20402    }
20403    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20404        let mut __tmp = BytesMut::new(bytes);
20405        #[allow(clippy::absurd_extreme_comparisons)]
20406        #[allow(unused_comparisons)]
20407        if __tmp.remaining() < Self::ENCODED_LEN {
20408            panic!(
20409                "buffer is too small (need {} bytes, but got {})",
20410                Self::ENCODED_LEN,
20411                __tmp.remaining(),
20412            )
20413        }
20414        __tmp.put_u8(self.target_system);
20415        __tmp.put_u8(self.target_component);
20416        if matches!(version, MavlinkVersion::V2) {
20417            __tmp.put_u8(self.mission_type as u8);
20418            let len = __tmp.len();
20419            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20420        } else {
20421            __tmp.len()
20422        }
20423    }
20424}
20425#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20426#[doc = ""]
20427#[doc = "ID: 37"]
20428#[derive(Debug, Clone, PartialEq)]
20429#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20430#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20431#[cfg_attr(feature = "ts", derive(TS))]
20432#[cfg_attr(feature = "ts", ts(export))]
20433pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20434    #[doc = "Start index"]
20435    pub start_index: i16,
20436    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20437    pub end_index: i16,
20438    #[doc = "System ID"]
20439    pub target_system: u8,
20440    #[doc = "Component ID"]
20441    pub target_component: u8,
20442    #[doc = "Mission type."]
20443    #[cfg_attr(feature = "serde", serde(default))]
20444    pub mission_type: MavMissionType,
20445}
20446impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20447    pub const ENCODED_LEN: usize = 7usize;
20448    pub const DEFAULT: Self = Self {
20449        start_index: 0_i16,
20450        end_index: 0_i16,
20451        target_system: 0_u8,
20452        target_component: 0_u8,
20453        mission_type: MavMissionType::DEFAULT,
20454    };
20455    #[cfg(feature = "arbitrary")]
20456    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20457        use arbitrary::{Arbitrary, Unstructured};
20458        let mut buf = [0u8; 1024];
20459        rng.fill_bytes(&mut buf);
20460        let mut unstructured = Unstructured::new(&buf);
20461        Self::arbitrary(&mut unstructured).unwrap_or_default()
20462    }
20463}
20464impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20465    fn default() -> Self {
20466        Self::DEFAULT.clone()
20467    }
20468}
20469impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20470    type Message = MavMessage;
20471    const ID: u32 = 37u32;
20472    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20473    const EXTRA_CRC: u8 = 212u8;
20474    const ENCODED_LEN: usize = 7usize;
20475    fn deser(
20476        _version: MavlinkVersion,
20477        __input: &[u8],
20478    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20479        let avail_len = __input.len();
20480        let mut payload_buf = [0; Self::ENCODED_LEN];
20481        let mut buf = if avail_len < Self::ENCODED_LEN {
20482            payload_buf[0..avail_len].copy_from_slice(__input);
20483            Bytes::new(&payload_buf)
20484        } else {
20485            Bytes::new(__input)
20486        };
20487        let mut __struct = Self::default();
20488        __struct.start_index = buf.get_i16_le();
20489        __struct.end_index = buf.get_i16_le();
20490        __struct.target_system = buf.get_u8();
20491        __struct.target_component = buf.get_u8();
20492        let tmp = buf.get_u8();
20493        __struct.mission_type =
20494            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20495                enum_type: "MavMissionType",
20496                value: tmp as u64,
20497            })?;
20498        Ok(__struct)
20499    }
20500    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20501        let mut __tmp = BytesMut::new(bytes);
20502        #[allow(clippy::absurd_extreme_comparisons)]
20503        #[allow(unused_comparisons)]
20504        if __tmp.remaining() < Self::ENCODED_LEN {
20505            panic!(
20506                "buffer is too small (need {} bytes, but got {})",
20507                Self::ENCODED_LEN,
20508                __tmp.remaining(),
20509            )
20510        }
20511        __tmp.put_i16_le(self.start_index);
20512        __tmp.put_i16_le(self.end_index);
20513        __tmp.put_u8(self.target_system);
20514        __tmp.put_u8(self.target_component);
20515        if matches!(version, MavlinkVersion::V2) {
20516            __tmp.put_u8(self.mission_type as u8);
20517            let len = __tmp.len();
20518            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20519        } else {
20520            __tmp.len()
20521        }
20522    }
20523}
20524#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20525#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20526#[doc = ""]
20527#[doc = "ID: 41"]
20528#[derive(Debug, Clone, PartialEq)]
20529#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20530#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20531#[cfg_attr(feature = "ts", derive(TS))]
20532#[cfg_attr(feature = "ts", ts(export))]
20533pub struct MISSION_SET_CURRENT_DATA {
20534    #[doc = "Sequence"]
20535    pub seq: u16,
20536    #[doc = "System ID"]
20537    pub target_system: u8,
20538    #[doc = "Component ID"]
20539    pub target_component: u8,
20540}
20541impl MISSION_SET_CURRENT_DATA {
20542    pub const ENCODED_LEN: usize = 4usize;
20543    pub const DEFAULT: Self = Self {
20544        seq: 0_u16,
20545        target_system: 0_u8,
20546        target_component: 0_u8,
20547    };
20548    #[cfg(feature = "arbitrary")]
20549    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20550        use arbitrary::{Arbitrary, Unstructured};
20551        let mut buf = [0u8; 1024];
20552        rng.fill_bytes(&mut buf);
20553        let mut unstructured = Unstructured::new(&buf);
20554        Self::arbitrary(&mut unstructured).unwrap_or_default()
20555    }
20556}
20557impl Default for MISSION_SET_CURRENT_DATA {
20558    fn default() -> Self {
20559        Self::DEFAULT.clone()
20560    }
20561}
20562impl MessageData for MISSION_SET_CURRENT_DATA {
20563    type Message = MavMessage;
20564    const ID: u32 = 41u32;
20565    const NAME: &'static str = "MISSION_SET_CURRENT";
20566    const EXTRA_CRC: u8 = 28u8;
20567    const ENCODED_LEN: usize = 4usize;
20568    fn deser(
20569        _version: MavlinkVersion,
20570        __input: &[u8],
20571    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20572        let avail_len = __input.len();
20573        let mut payload_buf = [0; Self::ENCODED_LEN];
20574        let mut buf = if avail_len < Self::ENCODED_LEN {
20575            payload_buf[0..avail_len].copy_from_slice(__input);
20576            Bytes::new(&payload_buf)
20577        } else {
20578            Bytes::new(__input)
20579        };
20580        let mut __struct = Self::default();
20581        __struct.seq = buf.get_u16_le();
20582        __struct.target_system = buf.get_u8();
20583        __struct.target_component = buf.get_u8();
20584        Ok(__struct)
20585    }
20586    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20587        let mut __tmp = BytesMut::new(bytes);
20588        #[allow(clippy::absurd_extreme_comparisons)]
20589        #[allow(unused_comparisons)]
20590        if __tmp.remaining() < Self::ENCODED_LEN {
20591            panic!(
20592                "buffer is too small (need {} bytes, but got {})",
20593                Self::ENCODED_LEN,
20594                __tmp.remaining(),
20595            )
20596        }
20597        __tmp.put_u16_le(self.seq);
20598        __tmp.put_u8(self.target_system);
20599        __tmp.put_u8(self.target_component);
20600        if matches!(version, MavlinkVersion::V2) {
20601            let len = __tmp.len();
20602            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20603        } else {
20604            __tmp.len()
20605        }
20606    }
20607}
20608#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20609#[doc = ""]
20610#[doc = "ID: 38"]
20611#[derive(Debug, Clone, PartialEq)]
20612#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20613#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20614#[cfg_attr(feature = "ts", derive(TS))]
20615#[cfg_attr(feature = "ts", ts(export))]
20616pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20617    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20618    pub start_index: i16,
20619    #[doc = "End index, equal or greater than start index."]
20620    pub end_index: i16,
20621    #[doc = "System ID"]
20622    pub target_system: u8,
20623    #[doc = "Component ID"]
20624    pub target_component: u8,
20625    #[doc = "Mission type."]
20626    #[cfg_attr(feature = "serde", serde(default))]
20627    pub mission_type: MavMissionType,
20628}
20629impl MISSION_WRITE_PARTIAL_LIST_DATA {
20630    pub const ENCODED_LEN: usize = 7usize;
20631    pub const DEFAULT: Self = Self {
20632        start_index: 0_i16,
20633        end_index: 0_i16,
20634        target_system: 0_u8,
20635        target_component: 0_u8,
20636        mission_type: MavMissionType::DEFAULT,
20637    };
20638    #[cfg(feature = "arbitrary")]
20639    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20640        use arbitrary::{Arbitrary, Unstructured};
20641        let mut buf = [0u8; 1024];
20642        rng.fill_bytes(&mut buf);
20643        let mut unstructured = Unstructured::new(&buf);
20644        Self::arbitrary(&mut unstructured).unwrap_or_default()
20645    }
20646}
20647impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20648    fn default() -> Self {
20649        Self::DEFAULT.clone()
20650    }
20651}
20652impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20653    type Message = MavMessage;
20654    const ID: u32 = 38u32;
20655    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20656    const EXTRA_CRC: u8 = 9u8;
20657    const ENCODED_LEN: usize = 7usize;
20658    fn deser(
20659        _version: MavlinkVersion,
20660        __input: &[u8],
20661    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20662        let avail_len = __input.len();
20663        let mut payload_buf = [0; Self::ENCODED_LEN];
20664        let mut buf = if avail_len < Self::ENCODED_LEN {
20665            payload_buf[0..avail_len].copy_from_slice(__input);
20666            Bytes::new(&payload_buf)
20667        } else {
20668            Bytes::new(__input)
20669        };
20670        let mut __struct = Self::default();
20671        __struct.start_index = buf.get_i16_le();
20672        __struct.end_index = buf.get_i16_le();
20673        __struct.target_system = buf.get_u8();
20674        __struct.target_component = buf.get_u8();
20675        let tmp = buf.get_u8();
20676        __struct.mission_type =
20677            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20678                enum_type: "MavMissionType",
20679                value: tmp as u64,
20680            })?;
20681        Ok(__struct)
20682    }
20683    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20684        let mut __tmp = BytesMut::new(bytes);
20685        #[allow(clippy::absurd_extreme_comparisons)]
20686        #[allow(unused_comparisons)]
20687        if __tmp.remaining() < Self::ENCODED_LEN {
20688            panic!(
20689                "buffer is too small (need {} bytes, but got {})",
20690                Self::ENCODED_LEN,
20691                __tmp.remaining(),
20692            )
20693        }
20694        __tmp.put_i16_le(self.start_index);
20695        __tmp.put_i16_le(self.end_index);
20696        __tmp.put_u8(self.target_system);
20697        __tmp.put_u8(self.target_component);
20698        if matches!(version, MavlinkVersion::V2) {
20699            __tmp.put_u8(self.mission_type as u8);
20700            let len = __tmp.len();
20701            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20702        } else {
20703            __tmp.len()
20704        }
20705    }
20706}
20707#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20708#[doc = "Orientation of a mount."]
20709#[doc = ""]
20710#[doc = "ID: 265"]
20711#[derive(Debug, Clone, PartialEq)]
20712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20713#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20714#[cfg_attr(feature = "ts", derive(TS))]
20715#[cfg_attr(feature = "ts", ts(export))]
20716pub struct MOUNT_ORIENTATION_DATA {
20717    #[doc = "Timestamp (time since system boot)."]
20718    pub time_boot_ms: u32,
20719    #[doc = "Roll in global frame (set to NaN for invalid)."]
20720    pub roll: f32,
20721    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20722    pub pitch: f32,
20723    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20724    pub yaw: f32,
20725    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20726    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20727    pub yaw_absolute: f32,
20728}
20729impl MOUNT_ORIENTATION_DATA {
20730    pub const ENCODED_LEN: usize = 20usize;
20731    pub const DEFAULT: Self = Self {
20732        time_boot_ms: 0_u32,
20733        roll: 0.0_f32,
20734        pitch: 0.0_f32,
20735        yaw: 0.0_f32,
20736        yaw_absolute: 0.0_f32,
20737    };
20738    #[cfg(feature = "arbitrary")]
20739    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20740        use arbitrary::{Arbitrary, Unstructured};
20741        let mut buf = [0u8; 1024];
20742        rng.fill_bytes(&mut buf);
20743        let mut unstructured = Unstructured::new(&buf);
20744        Self::arbitrary(&mut unstructured).unwrap_or_default()
20745    }
20746}
20747impl Default for MOUNT_ORIENTATION_DATA {
20748    fn default() -> Self {
20749        Self::DEFAULT.clone()
20750    }
20751}
20752impl MessageData for MOUNT_ORIENTATION_DATA {
20753    type Message = MavMessage;
20754    const ID: u32 = 265u32;
20755    const NAME: &'static str = "MOUNT_ORIENTATION";
20756    const EXTRA_CRC: u8 = 26u8;
20757    const ENCODED_LEN: usize = 20usize;
20758    fn deser(
20759        _version: MavlinkVersion,
20760        __input: &[u8],
20761    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20762        let avail_len = __input.len();
20763        let mut payload_buf = [0; Self::ENCODED_LEN];
20764        let mut buf = if avail_len < Self::ENCODED_LEN {
20765            payload_buf[0..avail_len].copy_from_slice(__input);
20766            Bytes::new(&payload_buf)
20767        } else {
20768            Bytes::new(__input)
20769        };
20770        let mut __struct = Self::default();
20771        __struct.time_boot_ms = buf.get_u32_le();
20772        __struct.roll = buf.get_f32_le();
20773        __struct.pitch = buf.get_f32_le();
20774        __struct.yaw = buf.get_f32_le();
20775        __struct.yaw_absolute = buf.get_f32_le();
20776        Ok(__struct)
20777    }
20778    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20779        let mut __tmp = BytesMut::new(bytes);
20780        #[allow(clippy::absurd_extreme_comparisons)]
20781        #[allow(unused_comparisons)]
20782        if __tmp.remaining() < Self::ENCODED_LEN {
20783            panic!(
20784                "buffer is too small (need {} bytes, but got {})",
20785                Self::ENCODED_LEN,
20786                __tmp.remaining(),
20787            )
20788        }
20789        __tmp.put_u32_le(self.time_boot_ms);
20790        __tmp.put_f32_le(self.roll);
20791        __tmp.put_f32_le(self.pitch);
20792        __tmp.put_f32_le(self.yaw);
20793        if matches!(version, MavlinkVersion::V2) {
20794            __tmp.put_f32_le(self.yaw_absolute);
20795            let len = __tmp.len();
20796            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20797        } else {
20798            __tmp.len()
20799        }
20800    }
20801}
20802#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20803#[doc = ""]
20804#[doc = "ID: 251"]
20805#[derive(Debug, Clone, PartialEq)]
20806#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20807#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20808#[cfg_attr(feature = "ts", derive(TS))]
20809#[cfg_attr(feature = "ts", ts(export))]
20810pub struct NAMED_VALUE_FLOAT_DATA {
20811    #[doc = "Timestamp (time since system boot)."]
20812    pub time_boot_ms: u32,
20813    #[doc = "Floating point value"]
20814    pub value: f32,
20815    #[doc = "Name of the debug variable"]
20816    #[cfg_attr(feature = "ts", ts(type = "string"))]
20817    pub name: CharArray<10>,
20818}
20819impl NAMED_VALUE_FLOAT_DATA {
20820    pub const ENCODED_LEN: usize = 18usize;
20821    pub const DEFAULT: Self = Self {
20822        time_boot_ms: 0_u32,
20823        value: 0.0_f32,
20824        name: CharArray::new([0_u8; 10usize]),
20825    };
20826    #[cfg(feature = "arbitrary")]
20827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20828        use arbitrary::{Arbitrary, Unstructured};
20829        let mut buf = [0u8; 1024];
20830        rng.fill_bytes(&mut buf);
20831        let mut unstructured = Unstructured::new(&buf);
20832        Self::arbitrary(&mut unstructured).unwrap_or_default()
20833    }
20834}
20835impl Default for NAMED_VALUE_FLOAT_DATA {
20836    fn default() -> Self {
20837        Self::DEFAULT.clone()
20838    }
20839}
20840impl MessageData for NAMED_VALUE_FLOAT_DATA {
20841    type Message = MavMessage;
20842    const ID: u32 = 251u32;
20843    const NAME: &'static str = "NAMED_VALUE_FLOAT";
20844    const EXTRA_CRC: u8 = 170u8;
20845    const ENCODED_LEN: usize = 18usize;
20846    fn deser(
20847        _version: MavlinkVersion,
20848        __input: &[u8],
20849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20850        let avail_len = __input.len();
20851        let mut payload_buf = [0; Self::ENCODED_LEN];
20852        let mut buf = if avail_len < Self::ENCODED_LEN {
20853            payload_buf[0..avail_len].copy_from_slice(__input);
20854            Bytes::new(&payload_buf)
20855        } else {
20856            Bytes::new(__input)
20857        };
20858        let mut __struct = Self::default();
20859        __struct.time_boot_ms = buf.get_u32_le();
20860        __struct.value = buf.get_f32_le();
20861        let mut tmp = [0_u8; 10usize];
20862        for v in &mut tmp {
20863            *v = buf.get_u8();
20864        }
20865        __struct.name = CharArray::new(tmp);
20866        Ok(__struct)
20867    }
20868    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20869        let mut __tmp = BytesMut::new(bytes);
20870        #[allow(clippy::absurd_extreme_comparisons)]
20871        #[allow(unused_comparisons)]
20872        if __tmp.remaining() < Self::ENCODED_LEN {
20873            panic!(
20874                "buffer is too small (need {} bytes, but got {})",
20875                Self::ENCODED_LEN,
20876                __tmp.remaining(),
20877            )
20878        }
20879        __tmp.put_u32_le(self.time_boot_ms);
20880        __tmp.put_f32_le(self.value);
20881        for val in &self.name {
20882            __tmp.put_u8(*val);
20883        }
20884        if matches!(version, MavlinkVersion::V2) {
20885            let len = __tmp.len();
20886            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20887        } else {
20888            __tmp.len()
20889        }
20890    }
20891}
20892#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20893#[doc = ""]
20894#[doc = "ID: 252"]
20895#[derive(Debug, Clone, PartialEq)]
20896#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20897#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20898#[cfg_attr(feature = "ts", derive(TS))]
20899#[cfg_attr(feature = "ts", ts(export))]
20900pub struct NAMED_VALUE_INT_DATA {
20901    #[doc = "Timestamp (time since system boot)."]
20902    pub time_boot_ms: u32,
20903    #[doc = "Signed integer value"]
20904    pub value: i32,
20905    #[doc = "Name of the debug variable"]
20906    #[cfg_attr(feature = "ts", ts(type = "string"))]
20907    pub name: CharArray<10>,
20908}
20909impl NAMED_VALUE_INT_DATA {
20910    pub const ENCODED_LEN: usize = 18usize;
20911    pub const DEFAULT: Self = Self {
20912        time_boot_ms: 0_u32,
20913        value: 0_i32,
20914        name: CharArray::new([0_u8; 10usize]),
20915    };
20916    #[cfg(feature = "arbitrary")]
20917    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20918        use arbitrary::{Arbitrary, Unstructured};
20919        let mut buf = [0u8; 1024];
20920        rng.fill_bytes(&mut buf);
20921        let mut unstructured = Unstructured::new(&buf);
20922        Self::arbitrary(&mut unstructured).unwrap_or_default()
20923    }
20924}
20925impl Default for NAMED_VALUE_INT_DATA {
20926    fn default() -> Self {
20927        Self::DEFAULT.clone()
20928    }
20929}
20930impl MessageData for NAMED_VALUE_INT_DATA {
20931    type Message = MavMessage;
20932    const ID: u32 = 252u32;
20933    const NAME: &'static str = "NAMED_VALUE_INT";
20934    const EXTRA_CRC: u8 = 44u8;
20935    const ENCODED_LEN: usize = 18usize;
20936    fn deser(
20937        _version: MavlinkVersion,
20938        __input: &[u8],
20939    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20940        let avail_len = __input.len();
20941        let mut payload_buf = [0; Self::ENCODED_LEN];
20942        let mut buf = if avail_len < Self::ENCODED_LEN {
20943            payload_buf[0..avail_len].copy_from_slice(__input);
20944            Bytes::new(&payload_buf)
20945        } else {
20946            Bytes::new(__input)
20947        };
20948        let mut __struct = Self::default();
20949        __struct.time_boot_ms = buf.get_u32_le();
20950        __struct.value = buf.get_i32_le();
20951        let mut tmp = [0_u8; 10usize];
20952        for v in &mut tmp {
20953            *v = buf.get_u8();
20954        }
20955        __struct.name = CharArray::new(tmp);
20956        Ok(__struct)
20957    }
20958    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20959        let mut __tmp = BytesMut::new(bytes);
20960        #[allow(clippy::absurd_extreme_comparisons)]
20961        #[allow(unused_comparisons)]
20962        if __tmp.remaining() < Self::ENCODED_LEN {
20963            panic!(
20964                "buffer is too small (need {} bytes, but got {})",
20965                Self::ENCODED_LEN,
20966                __tmp.remaining(),
20967            )
20968        }
20969        __tmp.put_u32_le(self.time_boot_ms);
20970        __tmp.put_i32_le(self.value);
20971        for val in &self.name {
20972            __tmp.put_u8(*val);
20973        }
20974        if matches!(version, MavlinkVersion::V2) {
20975            let len = __tmp.len();
20976            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20977        } else {
20978            __tmp.len()
20979        }
20980    }
20981}
20982#[doc = "The state of the navigation and position controller."]
20983#[doc = ""]
20984#[doc = "ID: 62"]
20985#[derive(Debug, Clone, PartialEq)]
20986#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20988#[cfg_attr(feature = "ts", derive(TS))]
20989#[cfg_attr(feature = "ts", ts(export))]
20990pub struct NAV_CONTROLLER_OUTPUT_DATA {
20991    #[doc = "Current desired roll"]
20992    pub nav_roll: f32,
20993    #[doc = "Current desired pitch"]
20994    pub nav_pitch: f32,
20995    #[doc = "Current altitude error"]
20996    pub alt_error: f32,
20997    #[doc = "Current airspeed error"]
20998    pub aspd_error: f32,
20999    #[doc = "Current crosstrack error on x-y plane"]
21000    pub xtrack_error: f32,
21001    #[doc = "Current desired heading"]
21002    pub nav_bearing: i16,
21003    #[doc = "Bearing to current waypoint/target"]
21004    pub target_bearing: i16,
21005    #[doc = "Distance to active waypoint"]
21006    pub wp_dist: u16,
21007}
21008impl NAV_CONTROLLER_OUTPUT_DATA {
21009    pub const ENCODED_LEN: usize = 26usize;
21010    pub const DEFAULT: Self = Self {
21011        nav_roll: 0.0_f32,
21012        nav_pitch: 0.0_f32,
21013        alt_error: 0.0_f32,
21014        aspd_error: 0.0_f32,
21015        xtrack_error: 0.0_f32,
21016        nav_bearing: 0_i16,
21017        target_bearing: 0_i16,
21018        wp_dist: 0_u16,
21019    };
21020    #[cfg(feature = "arbitrary")]
21021    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21022        use arbitrary::{Arbitrary, Unstructured};
21023        let mut buf = [0u8; 1024];
21024        rng.fill_bytes(&mut buf);
21025        let mut unstructured = Unstructured::new(&buf);
21026        Self::arbitrary(&mut unstructured).unwrap_or_default()
21027    }
21028}
21029impl Default for NAV_CONTROLLER_OUTPUT_DATA {
21030    fn default() -> Self {
21031        Self::DEFAULT.clone()
21032    }
21033}
21034impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21035    type Message = MavMessage;
21036    const ID: u32 = 62u32;
21037    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21038    const EXTRA_CRC: u8 = 183u8;
21039    const ENCODED_LEN: usize = 26usize;
21040    fn deser(
21041        _version: MavlinkVersion,
21042        __input: &[u8],
21043    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21044        let avail_len = __input.len();
21045        let mut payload_buf = [0; Self::ENCODED_LEN];
21046        let mut buf = if avail_len < Self::ENCODED_LEN {
21047            payload_buf[0..avail_len].copy_from_slice(__input);
21048            Bytes::new(&payload_buf)
21049        } else {
21050            Bytes::new(__input)
21051        };
21052        let mut __struct = Self::default();
21053        __struct.nav_roll = buf.get_f32_le();
21054        __struct.nav_pitch = buf.get_f32_le();
21055        __struct.alt_error = buf.get_f32_le();
21056        __struct.aspd_error = buf.get_f32_le();
21057        __struct.xtrack_error = buf.get_f32_le();
21058        __struct.nav_bearing = buf.get_i16_le();
21059        __struct.target_bearing = buf.get_i16_le();
21060        __struct.wp_dist = buf.get_u16_le();
21061        Ok(__struct)
21062    }
21063    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21064        let mut __tmp = BytesMut::new(bytes);
21065        #[allow(clippy::absurd_extreme_comparisons)]
21066        #[allow(unused_comparisons)]
21067        if __tmp.remaining() < Self::ENCODED_LEN {
21068            panic!(
21069                "buffer is too small (need {} bytes, but got {})",
21070                Self::ENCODED_LEN,
21071                __tmp.remaining(),
21072            )
21073        }
21074        __tmp.put_f32_le(self.nav_roll);
21075        __tmp.put_f32_le(self.nav_pitch);
21076        __tmp.put_f32_le(self.alt_error);
21077        __tmp.put_f32_le(self.aspd_error);
21078        __tmp.put_f32_le(self.xtrack_error);
21079        __tmp.put_i16_le(self.nav_bearing);
21080        __tmp.put_i16_le(self.target_bearing);
21081        __tmp.put_u16_le(self.wp_dist);
21082        if matches!(version, MavlinkVersion::V2) {
21083            let len = __tmp.len();
21084            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21085        } else {
21086            __tmp.len()
21087        }
21088    }
21089}
21090#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21091#[doc = ""]
21092#[doc = "ID: 330"]
21093#[derive(Debug, Clone, PartialEq)]
21094#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21095#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21096#[cfg_attr(feature = "ts", derive(TS))]
21097#[cfg_attr(feature = "ts", ts(export))]
21098pub struct OBSTACLE_DISTANCE_DATA {
21099    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21100    pub time_usec: u64,
21101    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21102    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21103    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21104    pub distances: [u16; 72],
21105    #[doc = "Minimum distance the sensor can measure."]
21106    pub min_distance: u16,
21107    #[doc = "Maximum distance the sensor can measure."]
21108    pub max_distance: u16,
21109    #[doc = "Class id of the distance sensor type."]
21110    pub sensor_type: MavDistanceSensor,
21111    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21112    pub increment: u8,
21113    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21114    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21115    pub increment_f: f32,
21116    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21117    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21118    pub angle_offset: f32,
21119    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21120    #[cfg_attr(feature = "serde", serde(default))]
21121    pub frame: MavFrame,
21122}
21123impl OBSTACLE_DISTANCE_DATA {
21124    pub const ENCODED_LEN: usize = 167usize;
21125    pub const DEFAULT: Self = Self {
21126        time_usec: 0_u64,
21127        distances: [0_u16; 72usize],
21128        min_distance: 0_u16,
21129        max_distance: 0_u16,
21130        sensor_type: MavDistanceSensor::DEFAULT,
21131        increment: 0_u8,
21132        increment_f: 0.0_f32,
21133        angle_offset: 0.0_f32,
21134        frame: MavFrame::DEFAULT,
21135    };
21136    #[cfg(feature = "arbitrary")]
21137    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21138        use arbitrary::{Arbitrary, Unstructured};
21139        let mut buf = [0u8; 1024];
21140        rng.fill_bytes(&mut buf);
21141        let mut unstructured = Unstructured::new(&buf);
21142        Self::arbitrary(&mut unstructured).unwrap_or_default()
21143    }
21144}
21145impl Default for OBSTACLE_DISTANCE_DATA {
21146    fn default() -> Self {
21147        Self::DEFAULT.clone()
21148    }
21149}
21150impl MessageData for OBSTACLE_DISTANCE_DATA {
21151    type Message = MavMessage;
21152    const ID: u32 = 330u32;
21153    const NAME: &'static str = "OBSTACLE_DISTANCE";
21154    const EXTRA_CRC: u8 = 23u8;
21155    const ENCODED_LEN: usize = 167usize;
21156    fn deser(
21157        _version: MavlinkVersion,
21158        __input: &[u8],
21159    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21160        let avail_len = __input.len();
21161        let mut payload_buf = [0; Self::ENCODED_LEN];
21162        let mut buf = if avail_len < Self::ENCODED_LEN {
21163            payload_buf[0..avail_len].copy_from_slice(__input);
21164            Bytes::new(&payload_buf)
21165        } else {
21166            Bytes::new(__input)
21167        };
21168        let mut __struct = Self::default();
21169        __struct.time_usec = buf.get_u64_le();
21170        for v in &mut __struct.distances {
21171            let val = buf.get_u16_le();
21172            *v = val;
21173        }
21174        __struct.min_distance = buf.get_u16_le();
21175        __struct.max_distance = buf.get_u16_le();
21176        let tmp = buf.get_u8();
21177        __struct.sensor_type =
21178            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21179                enum_type: "MavDistanceSensor",
21180                value: tmp as u64,
21181            })?;
21182        __struct.increment = buf.get_u8();
21183        __struct.increment_f = buf.get_f32_le();
21184        __struct.angle_offset = buf.get_f32_le();
21185        let tmp = buf.get_u8();
21186        __struct.frame =
21187            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21188                enum_type: "MavFrame",
21189                value: tmp as u64,
21190            })?;
21191        Ok(__struct)
21192    }
21193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21194        let mut __tmp = BytesMut::new(bytes);
21195        #[allow(clippy::absurd_extreme_comparisons)]
21196        #[allow(unused_comparisons)]
21197        if __tmp.remaining() < Self::ENCODED_LEN {
21198            panic!(
21199                "buffer is too small (need {} bytes, but got {})",
21200                Self::ENCODED_LEN,
21201                __tmp.remaining(),
21202            )
21203        }
21204        __tmp.put_u64_le(self.time_usec);
21205        for val in &self.distances {
21206            __tmp.put_u16_le(*val);
21207        }
21208        __tmp.put_u16_le(self.min_distance);
21209        __tmp.put_u16_le(self.max_distance);
21210        __tmp.put_u8(self.sensor_type as u8);
21211        __tmp.put_u8(self.increment);
21212        if matches!(version, MavlinkVersion::V2) {
21213            __tmp.put_f32_le(self.increment_f);
21214            __tmp.put_f32_le(self.angle_offset);
21215            __tmp.put_u8(self.frame as u8);
21216            let len = __tmp.len();
21217            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21218        } else {
21219            __tmp.len()
21220        }
21221    }
21222}
21223#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21224#[doc = ""]
21225#[doc = "ID: 331"]
21226#[derive(Debug, Clone, PartialEq)]
21227#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21228#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21229#[cfg_attr(feature = "ts", derive(TS))]
21230#[cfg_attr(feature = "ts", ts(export))]
21231pub struct ODOMETRY_DATA {
21232    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21233    pub time_usec: u64,
21234    #[doc = "X Position"]
21235    pub x: f32,
21236    #[doc = "Y Position"]
21237    pub y: f32,
21238    #[doc = "Z Position"]
21239    pub z: f32,
21240    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21241    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21242    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21243    pub q: [f32; 4],
21244    #[doc = "X linear speed"]
21245    pub vx: f32,
21246    #[doc = "Y linear speed"]
21247    pub vy: f32,
21248    #[doc = "Z linear speed"]
21249    pub vz: f32,
21250    #[doc = "Roll angular speed"]
21251    pub rollspeed: f32,
21252    #[doc = "Pitch angular speed"]
21253    pub pitchspeed: f32,
21254    #[doc = "Yaw angular speed"]
21255    pub yawspeed: f32,
21256    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21257    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21258    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21259    pub pose_covariance: [f32; 21],
21260    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21261    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21262    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21263    pub velocity_covariance: [f32; 21],
21264    #[doc = "Coordinate frame of reference for the pose data."]
21265    pub frame_id: MavFrame,
21266    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21267    pub child_frame_id: MavFrame,
21268    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21269    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21270    pub reset_counter: u8,
21271    #[doc = "Type of estimator that is providing the odometry."]
21272    #[cfg_attr(feature = "serde", serde(default))]
21273    pub estimator_type: MavEstimatorType,
21274    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21275    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21276    pub quality: i8,
21277}
21278impl ODOMETRY_DATA {
21279    pub const ENCODED_LEN: usize = 233usize;
21280    pub const DEFAULT: Self = Self {
21281        time_usec: 0_u64,
21282        x: 0.0_f32,
21283        y: 0.0_f32,
21284        z: 0.0_f32,
21285        q: [0.0_f32; 4usize],
21286        vx: 0.0_f32,
21287        vy: 0.0_f32,
21288        vz: 0.0_f32,
21289        rollspeed: 0.0_f32,
21290        pitchspeed: 0.0_f32,
21291        yawspeed: 0.0_f32,
21292        pose_covariance: [0.0_f32; 21usize],
21293        velocity_covariance: [0.0_f32; 21usize],
21294        frame_id: MavFrame::DEFAULT,
21295        child_frame_id: MavFrame::DEFAULT,
21296        reset_counter: 0_u8,
21297        estimator_type: MavEstimatorType::DEFAULT,
21298        quality: 0_i8,
21299    };
21300    #[cfg(feature = "arbitrary")]
21301    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21302        use arbitrary::{Arbitrary, Unstructured};
21303        let mut buf = [0u8; 1024];
21304        rng.fill_bytes(&mut buf);
21305        let mut unstructured = Unstructured::new(&buf);
21306        Self::arbitrary(&mut unstructured).unwrap_or_default()
21307    }
21308}
21309impl Default for ODOMETRY_DATA {
21310    fn default() -> Self {
21311        Self::DEFAULT.clone()
21312    }
21313}
21314impl MessageData for ODOMETRY_DATA {
21315    type Message = MavMessage;
21316    const ID: u32 = 331u32;
21317    const NAME: &'static str = "ODOMETRY";
21318    const EXTRA_CRC: u8 = 91u8;
21319    const ENCODED_LEN: usize = 233usize;
21320    fn deser(
21321        _version: MavlinkVersion,
21322        __input: &[u8],
21323    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21324        let avail_len = __input.len();
21325        let mut payload_buf = [0; Self::ENCODED_LEN];
21326        let mut buf = if avail_len < Self::ENCODED_LEN {
21327            payload_buf[0..avail_len].copy_from_slice(__input);
21328            Bytes::new(&payload_buf)
21329        } else {
21330            Bytes::new(__input)
21331        };
21332        let mut __struct = Self::default();
21333        __struct.time_usec = buf.get_u64_le();
21334        __struct.x = buf.get_f32_le();
21335        __struct.y = buf.get_f32_le();
21336        __struct.z = buf.get_f32_le();
21337        for v in &mut __struct.q {
21338            let val = buf.get_f32_le();
21339            *v = val;
21340        }
21341        __struct.vx = buf.get_f32_le();
21342        __struct.vy = buf.get_f32_le();
21343        __struct.vz = buf.get_f32_le();
21344        __struct.rollspeed = buf.get_f32_le();
21345        __struct.pitchspeed = buf.get_f32_le();
21346        __struct.yawspeed = buf.get_f32_le();
21347        for v in &mut __struct.pose_covariance {
21348            let val = buf.get_f32_le();
21349            *v = val;
21350        }
21351        for v in &mut __struct.velocity_covariance {
21352            let val = buf.get_f32_le();
21353            *v = val;
21354        }
21355        let tmp = buf.get_u8();
21356        __struct.frame_id =
21357            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21358                enum_type: "MavFrame",
21359                value: tmp as u64,
21360            })?;
21361        let tmp = buf.get_u8();
21362        __struct.child_frame_id =
21363            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21364                enum_type: "MavFrame",
21365                value: tmp as u64,
21366            })?;
21367        __struct.reset_counter = buf.get_u8();
21368        let tmp = buf.get_u8();
21369        __struct.estimator_type =
21370            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21371                enum_type: "MavEstimatorType",
21372                value: tmp as u64,
21373            })?;
21374        __struct.quality = buf.get_i8();
21375        Ok(__struct)
21376    }
21377    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21378        let mut __tmp = BytesMut::new(bytes);
21379        #[allow(clippy::absurd_extreme_comparisons)]
21380        #[allow(unused_comparisons)]
21381        if __tmp.remaining() < Self::ENCODED_LEN {
21382            panic!(
21383                "buffer is too small (need {} bytes, but got {})",
21384                Self::ENCODED_LEN,
21385                __tmp.remaining(),
21386            )
21387        }
21388        __tmp.put_u64_le(self.time_usec);
21389        __tmp.put_f32_le(self.x);
21390        __tmp.put_f32_le(self.y);
21391        __tmp.put_f32_le(self.z);
21392        for val in &self.q {
21393            __tmp.put_f32_le(*val);
21394        }
21395        __tmp.put_f32_le(self.vx);
21396        __tmp.put_f32_le(self.vy);
21397        __tmp.put_f32_le(self.vz);
21398        __tmp.put_f32_le(self.rollspeed);
21399        __tmp.put_f32_le(self.pitchspeed);
21400        __tmp.put_f32_le(self.yawspeed);
21401        for val in &self.pose_covariance {
21402            __tmp.put_f32_le(*val);
21403        }
21404        for val in &self.velocity_covariance {
21405            __tmp.put_f32_le(*val);
21406        }
21407        __tmp.put_u8(self.frame_id as u8);
21408        __tmp.put_u8(self.child_frame_id as u8);
21409        if matches!(version, MavlinkVersion::V2) {
21410            __tmp.put_u8(self.reset_counter);
21411            __tmp.put_u8(self.estimator_type as u8);
21412            __tmp.put_i8(self.quality);
21413            let len = __tmp.len();
21414            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21415        } else {
21416            __tmp.len()
21417        }
21418    }
21419}
21420#[doc = "Hardware status sent by an onboard computer."]
21421#[doc = ""]
21422#[doc = "ID: 390"]
21423#[derive(Debug, Clone, PartialEq)]
21424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21426#[cfg_attr(feature = "ts", derive(TS))]
21427#[cfg_attr(feature = "ts", ts(export))]
21428pub struct ONBOARD_COMPUTER_STATUS_DATA {
21429    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21430    pub time_usec: u64,
21431    #[doc = "Time since system boot."]
21432    pub uptime: u32,
21433    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21434    pub ram_usage: u32,
21435    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21436    pub ram_total: u32,
21437    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21438    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21439    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21440    pub storage_type: [u32; 4],
21441    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21442    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21443    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21444    pub storage_usage: [u32; 4],
21445    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21446    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21447    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21448    pub storage_total: [u32; 4],
21449    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21450    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21451    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21452    pub link_type: [u32; 6],
21453    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21454    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21455    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21456    pub link_tx_rate: [u32; 6],
21457    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21458    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21459    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21460    pub link_rx_rate: [u32; 6],
21461    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21462    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21463    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21464    pub link_tx_max: [u32; 6],
21465    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21466    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21467    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21468    pub link_rx_max: [u32; 6],
21469    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21470    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21471    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21472    pub fan_speed: [i16; 4],
21473    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21474    pub mavtype: u8,
21475    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21476    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21477    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21478    pub cpu_cores: [u8; 8],
21479    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21480    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21481    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21482    pub cpu_combined: [u8; 10],
21483    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21484    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21485    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21486    pub gpu_cores: [u8; 4],
21487    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21488    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21489    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21490    pub gpu_combined: [u8; 10],
21491    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21492    pub temperature_board: i8,
21493    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21494    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21495    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21496    pub temperature_core: [i8; 8],
21497}
21498impl ONBOARD_COMPUTER_STATUS_DATA {
21499    pub const ENCODED_LEN: usize = 238usize;
21500    pub const DEFAULT: Self = Self {
21501        time_usec: 0_u64,
21502        uptime: 0_u32,
21503        ram_usage: 0_u32,
21504        ram_total: 0_u32,
21505        storage_type: [0_u32; 4usize],
21506        storage_usage: [0_u32; 4usize],
21507        storage_total: [0_u32; 4usize],
21508        link_type: [0_u32; 6usize],
21509        link_tx_rate: [0_u32; 6usize],
21510        link_rx_rate: [0_u32; 6usize],
21511        link_tx_max: [0_u32; 6usize],
21512        link_rx_max: [0_u32; 6usize],
21513        fan_speed: [0_i16; 4usize],
21514        mavtype: 0_u8,
21515        cpu_cores: [0_u8; 8usize],
21516        cpu_combined: [0_u8; 10usize],
21517        gpu_cores: [0_u8; 4usize],
21518        gpu_combined: [0_u8; 10usize],
21519        temperature_board: 0_i8,
21520        temperature_core: [0_i8; 8usize],
21521    };
21522    #[cfg(feature = "arbitrary")]
21523    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21524        use arbitrary::{Arbitrary, Unstructured};
21525        let mut buf = [0u8; 1024];
21526        rng.fill_bytes(&mut buf);
21527        let mut unstructured = Unstructured::new(&buf);
21528        Self::arbitrary(&mut unstructured).unwrap_or_default()
21529    }
21530}
21531impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21532    fn default() -> Self {
21533        Self::DEFAULT.clone()
21534    }
21535}
21536impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21537    type Message = MavMessage;
21538    const ID: u32 = 390u32;
21539    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21540    const EXTRA_CRC: u8 = 156u8;
21541    const ENCODED_LEN: usize = 238usize;
21542    fn deser(
21543        _version: MavlinkVersion,
21544        __input: &[u8],
21545    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21546        let avail_len = __input.len();
21547        let mut payload_buf = [0; Self::ENCODED_LEN];
21548        let mut buf = if avail_len < Self::ENCODED_LEN {
21549            payload_buf[0..avail_len].copy_from_slice(__input);
21550            Bytes::new(&payload_buf)
21551        } else {
21552            Bytes::new(__input)
21553        };
21554        let mut __struct = Self::default();
21555        __struct.time_usec = buf.get_u64_le();
21556        __struct.uptime = buf.get_u32_le();
21557        __struct.ram_usage = buf.get_u32_le();
21558        __struct.ram_total = buf.get_u32_le();
21559        for v in &mut __struct.storage_type {
21560            let val = buf.get_u32_le();
21561            *v = val;
21562        }
21563        for v in &mut __struct.storage_usage {
21564            let val = buf.get_u32_le();
21565            *v = val;
21566        }
21567        for v in &mut __struct.storage_total {
21568            let val = buf.get_u32_le();
21569            *v = val;
21570        }
21571        for v in &mut __struct.link_type {
21572            let val = buf.get_u32_le();
21573            *v = val;
21574        }
21575        for v in &mut __struct.link_tx_rate {
21576            let val = buf.get_u32_le();
21577            *v = val;
21578        }
21579        for v in &mut __struct.link_rx_rate {
21580            let val = buf.get_u32_le();
21581            *v = val;
21582        }
21583        for v in &mut __struct.link_tx_max {
21584            let val = buf.get_u32_le();
21585            *v = val;
21586        }
21587        for v in &mut __struct.link_rx_max {
21588            let val = buf.get_u32_le();
21589            *v = val;
21590        }
21591        for v in &mut __struct.fan_speed {
21592            let val = buf.get_i16_le();
21593            *v = val;
21594        }
21595        __struct.mavtype = buf.get_u8();
21596        for v in &mut __struct.cpu_cores {
21597            let val = buf.get_u8();
21598            *v = val;
21599        }
21600        for v in &mut __struct.cpu_combined {
21601            let val = buf.get_u8();
21602            *v = val;
21603        }
21604        for v in &mut __struct.gpu_cores {
21605            let val = buf.get_u8();
21606            *v = val;
21607        }
21608        for v in &mut __struct.gpu_combined {
21609            let val = buf.get_u8();
21610            *v = val;
21611        }
21612        __struct.temperature_board = buf.get_i8();
21613        for v in &mut __struct.temperature_core {
21614            let val = buf.get_i8();
21615            *v = val;
21616        }
21617        Ok(__struct)
21618    }
21619    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21620        let mut __tmp = BytesMut::new(bytes);
21621        #[allow(clippy::absurd_extreme_comparisons)]
21622        #[allow(unused_comparisons)]
21623        if __tmp.remaining() < Self::ENCODED_LEN {
21624            panic!(
21625                "buffer is too small (need {} bytes, but got {})",
21626                Self::ENCODED_LEN,
21627                __tmp.remaining(),
21628            )
21629        }
21630        __tmp.put_u64_le(self.time_usec);
21631        __tmp.put_u32_le(self.uptime);
21632        __tmp.put_u32_le(self.ram_usage);
21633        __tmp.put_u32_le(self.ram_total);
21634        for val in &self.storage_type {
21635            __tmp.put_u32_le(*val);
21636        }
21637        for val in &self.storage_usage {
21638            __tmp.put_u32_le(*val);
21639        }
21640        for val in &self.storage_total {
21641            __tmp.put_u32_le(*val);
21642        }
21643        for val in &self.link_type {
21644            __tmp.put_u32_le(*val);
21645        }
21646        for val in &self.link_tx_rate {
21647            __tmp.put_u32_le(*val);
21648        }
21649        for val in &self.link_rx_rate {
21650            __tmp.put_u32_le(*val);
21651        }
21652        for val in &self.link_tx_max {
21653            __tmp.put_u32_le(*val);
21654        }
21655        for val in &self.link_rx_max {
21656            __tmp.put_u32_le(*val);
21657        }
21658        for val in &self.fan_speed {
21659            __tmp.put_i16_le(*val);
21660        }
21661        __tmp.put_u8(self.mavtype);
21662        for val in &self.cpu_cores {
21663            __tmp.put_u8(*val);
21664        }
21665        for val in &self.cpu_combined {
21666            __tmp.put_u8(*val);
21667        }
21668        for val in &self.gpu_cores {
21669            __tmp.put_u8(*val);
21670        }
21671        for val in &self.gpu_combined {
21672            __tmp.put_u8(*val);
21673        }
21674        __tmp.put_i8(self.temperature_board);
21675        for val in &self.temperature_core {
21676            __tmp.put_i8(*val);
21677        }
21678        if matches!(version, MavlinkVersion::V2) {
21679            let len = __tmp.len();
21680            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21681        } else {
21682            __tmp.len()
21683        }
21684    }
21685}
21686#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21687#[doc = ""]
21688#[doc = "ID: 12918"]
21689#[derive(Debug, Clone, PartialEq)]
21690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21692#[cfg_attr(feature = "ts", derive(TS))]
21693#[cfg_attr(feature = "ts", ts(export))]
21694pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21695    #[doc = "Status level indicating if arming is allowed."]
21696    pub status: MavOdidArmStatus,
21697    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21698    #[cfg_attr(feature = "ts", ts(type = "string"))]
21699    pub error: CharArray<50>,
21700}
21701impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21702    pub const ENCODED_LEN: usize = 51usize;
21703    pub const DEFAULT: Self = Self {
21704        status: MavOdidArmStatus::DEFAULT,
21705        error: CharArray::new([0_u8; 50usize]),
21706    };
21707    #[cfg(feature = "arbitrary")]
21708    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21709        use arbitrary::{Arbitrary, Unstructured};
21710        let mut buf = [0u8; 1024];
21711        rng.fill_bytes(&mut buf);
21712        let mut unstructured = Unstructured::new(&buf);
21713        Self::arbitrary(&mut unstructured).unwrap_or_default()
21714    }
21715}
21716impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21717    fn default() -> Self {
21718        Self::DEFAULT.clone()
21719    }
21720}
21721impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21722    type Message = MavMessage;
21723    const ID: u32 = 12918u32;
21724    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21725    const EXTRA_CRC: u8 = 139u8;
21726    const ENCODED_LEN: usize = 51usize;
21727    fn deser(
21728        _version: MavlinkVersion,
21729        __input: &[u8],
21730    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21731        let avail_len = __input.len();
21732        let mut payload_buf = [0; Self::ENCODED_LEN];
21733        let mut buf = if avail_len < Self::ENCODED_LEN {
21734            payload_buf[0..avail_len].copy_from_slice(__input);
21735            Bytes::new(&payload_buf)
21736        } else {
21737            Bytes::new(__input)
21738        };
21739        let mut __struct = Self::default();
21740        let tmp = buf.get_u8();
21741        __struct.status =
21742            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21743                enum_type: "MavOdidArmStatus",
21744                value: tmp as u64,
21745            })?;
21746        let mut tmp = [0_u8; 50usize];
21747        for v in &mut tmp {
21748            *v = buf.get_u8();
21749        }
21750        __struct.error = CharArray::new(tmp);
21751        Ok(__struct)
21752    }
21753    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21754        let mut __tmp = BytesMut::new(bytes);
21755        #[allow(clippy::absurd_extreme_comparisons)]
21756        #[allow(unused_comparisons)]
21757        if __tmp.remaining() < Self::ENCODED_LEN {
21758            panic!(
21759                "buffer is too small (need {} bytes, but got {})",
21760                Self::ENCODED_LEN,
21761                __tmp.remaining(),
21762            )
21763        }
21764        __tmp.put_u8(self.status as u8);
21765        for val in &self.error {
21766            __tmp.put_u8(*val);
21767        }
21768        if matches!(version, MavlinkVersion::V2) {
21769            let len = __tmp.len();
21770            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21771        } else {
21772            __tmp.len()
21773        }
21774    }
21775}
21776#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
21777#[doc = ""]
21778#[doc = "ID: 12902"]
21779#[derive(Debug, Clone, PartialEq)]
21780#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21782#[cfg_attr(feature = "ts", derive(TS))]
21783#[cfg_attr(feature = "ts", ts(export))]
21784pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
21785    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21786    pub timestamp: u32,
21787    #[doc = "System ID (0 for broadcast)."]
21788    pub target_system: u8,
21789    #[doc = "Component ID (0 for broadcast)."]
21790    pub target_component: u8,
21791    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21792    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21793    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21794    pub id_or_mac: [u8; 20],
21795    #[doc = "Indicates the type of authentication."]
21796    pub authentication_type: MavOdidAuthType,
21797    #[doc = "Allowed range is 0 - 15."]
21798    pub data_page: u8,
21799    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21800    pub last_page_index: u8,
21801    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21802    pub length: u8,
21803    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
21804    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21805    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21806    pub authentication_data: [u8; 23],
21807}
21808impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
21809    pub const ENCODED_LEN: usize = 53usize;
21810    pub const DEFAULT: Self = Self {
21811        timestamp: 0_u32,
21812        target_system: 0_u8,
21813        target_component: 0_u8,
21814        id_or_mac: [0_u8; 20usize],
21815        authentication_type: MavOdidAuthType::DEFAULT,
21816        data_page: 0_u8,
21817        last_page_index: 0_u8,
21818        length: 0_u8,
21819        authentication_data: [0_u8; 23usize],
21820    };
21821    #[cfg(feature = "arbitrary")]
21822    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21823        use arbitrary::{Arbitrary, Unstructured};
21824        let mut buf = [0u8; 1024];
21825        rng.fill_bytes(&mut buf);
21826        let mut unstructured = Unstructured::new(&buf);
21827        Self::arbitrary(&mut unstructured).unwrap_or_default()
21828    }
21829}
21830impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21831    fn default() -> Self {
21832        Self::DEFAULT.clone()
21833    }
21834}
21835impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21836    type Message = MavMessage;
21837    const ID: u32 = 12902u32;
21838    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21839    const EXTRA_CRC: u8 = 140u8;
21840    const ENCODED_LEN: usize = 53usize;
21841    fn deser(
21842        _version: MavlinkVersion,
21843        __input: &[u8],
21844    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21845        let avail_len = __input.len();
21846        let mut payload_buf = [0; Self::ENCODED_LEN];
21847        let mut buf = if avail_len < Self::ENCODED_LEN {
21848            payload_buf[0..avail_len].copy_from_slice(__input);
21849            Bytes::new(&payload_buf)
21850        } else {
21851            Bytes::new(__input)
21852        };
21853        let mut __struct = Self::default();
21854        __struct.timestamp = buf.get_u32_le();
21855        __struct.target_system = buf.get_u8();
21856        __struct.target_component = buf.get_u8();
21857        for v in &mut __struct.id_or_mac {
21858            let val = buf.get_u8();
21859            *v = val;
21860        }
21861        let tmp = buf.get_u8();
21862        __struct.authentication_type =
21863            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21864                enum_type: "MavOdidAuthType",
21865                value: tmp as u64,
21866            })?;
21867        __struct.data_page = buf.get_u8();
21868        __struct.last_page_index = buf.get_u8();
21869        __struct.length = buf.get_u8();
21870        for v in &mut __struct.authentication_data {
21871            let val = buf.get_u8();
21872            *v = val;
21873        }
21874        Ok(__struct)
21875    }
21876    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21877        let mut __tmp = BytesMut::new(bytes);
21878        #[allow(clippy::absurd_extreme_comparisons)]
21879        #[allow(unused_comparisons)]
21880        if __tmp.remaining() < Self::ENCODED_LEN {
21881            panic!(
21882                "buffer is too small (need {} bytes, but got {})",
21883                Self::ENCODED_LEN,
21884                __tmp.remaining(),
21885            )
21886        }
21887        __tmp.put_u32_le(self.timestamp);
21888        __tmp.put_u8(self.target_system);
21889        __tmp.put_u8(self.target_component);
21890        for val in &self.id_or_mac {
21891            __tmp.put_u8(*val);
21892        }
21893        __tmp.put_u8(self.authentication_type as u8);
21894        __tmp.put_u8(self.data_page);
21895        __tmp.put_u8(self.last_page_index);
21896        __tmp.put_u8(self.length);
21897        for val in &self.authentication_data {
21898            __tmp.put_u8(*val);
21899        }
21900        if matches!(version, MavlinkVersion::V2) {
21901            let len = __tmp.len();
21902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21903        } else {
21904            __tmp.len()
21905        }
21906    }
21907}
21908#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21909#[doc = ""]
21910#[doc = "ID: 12900"]
21911#[derive(Debug, Clone, PartialEq)]
21912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21914#[cfg_attr(feature = "ts", derive(TS))]
21915#[cfg_attr(feature = "ts", ts(export))]
21916pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21917    #[doc = "System ID (0 for broadcast)."]
21918    pub target_system: u8,
21919    #[doc = "Component ID (0 for broadcast)."]
21920    pub target_component: u8,
21921    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21922    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21923    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21924    pub id_or_mac: [u8; 20],
21925    #[doc = "Indicates the format for the uas_id field of this message."]
21926    pub id_type: MavOdidIdType,
21927    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21928    pub ua_type: MavOdidUaType,
21929    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21930    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21931    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21932    pub uas_id: [u8; 20],
21933}
21934impl OPEN_DRONE_ID_BASIC_ID_DATA {
21935    pub const ENCODED_LEN: usize = 44usize;
21936    pub const DEFAULT: Self = Self {
21937        target_system: 0_u8,
21938        target_component: 0_u8,
21939        id_or_mac: [0_u8; 20usize],
21940        id_type: MavOdidIdType::DEFAULT,
21941        ua_type: MavOdidUaType::DEFAULT,
21942        uas_id: [0_u8; 20usize],
21943    };
21944    #[cfg(feature = "arbitrary")]
21945    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21946        use arbitrary::{Arbitrary, Unstructured};
21947        let mut buf = [0u8; 1024];
21948        rng.fill_bytes(&mut buf);
21949        let mut unstructured = Unstructured::new(&buf);
21950        Self::arbitrary(&mut unstructured).unwrap_or_default()
21951    }
21952}
21953impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21954    fn default() -> Self {
21955        Self::DEFAULT.clone()
21956    }
21957}
21958impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21959    type Message = MavMessage;
21960    const ID: u32 = 12900u32;
21961    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21962    const EXTRA_CRC: u8 = 114u8;
21963    const ENCODED_LEN: usize = 44usize;
21964    fn deser(
21965        _version: MavlinkVersion,
21966        __input: &[u8],
21967    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21968        let avail_len = __input.len();
21969        let mut payload_buf = [0; Self::ENCODED_LEN];
21970        let mut buf = if avail_len < Self::ENCODED_LEN {
21971            payload_buf[0..avail_len].copy_from_slice(__input);
21972            Bytes::new(&payload_buf)
21973        } else {
21974            Bytes::new(__input)
21975        };
21976        let mut __struct = Self::default();
21977        __struct.target_system = buf.get_u8();
21978        __struct.target_component = buf.get_u8();
21979        for v in &mut __struct.id_or_mac {
21980            let val = buf.get_u8();
21981            *v = val;
21982        }
21983        let tmp = buf.get_u8();
21984        __struct.id_type =
21985            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21986                enum_type: "MavOdidIdType",
21987                value: tmp as u64,
21988            })?;
21989        let tmp = buf.get_u8();
21990        __struct.ua_type =
21991            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21992                enum_type: "MavOdidUaType",
21993                value: tmp as u64,
21994            })?;
21995        for v in &mut __struct.uas_id {
21996            let val = buf.get_u8();
21997            *v = val;
21998        }
21999        Ok(__struct)
22000    }
22001    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22002        let mut __tmp = BytesMut::new(bytes);
22003        #[allow(clippy::absurd_extreme_comparisons)]
22004        #[allow(unused_comparisons)]
22005        if __tmp.remaining() < Self::ENCODED_LEN {
22006            panic!(
22007                "buffer is too small (need {} bytes, but got {})",
22008                Self::ENCODED_LEN,
22009                __tmp.remaining(),
22010            )
22011        }
22012        __tmp.put_u8(self.target_system);
22013        __tmp.put_u8(self.target_component);
22014        for val in &self.id_or_mac {
22015            __tmp.put_u8(*val);
22016        }
22017        __tmp.put_u8(self.id_type as u8);
22018        __tmp.put_u8(self.ua_type as u8);
22019        for val in &self.uas_id {
22020            __tmp.put_u8(*val);
22021        }
22022        if matches!(version, MavlinkVersion::V2) {
22023            let len = __tmp.len();
22024            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22025        } else {
22026            __tmp.len()
22027        }
22028    }
22029}
22030#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
22031#[doc = ""]
22032#[doc = "ID: 12901"]
22033#[derive(Debug, Clone, PartialEq)]
22034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22035#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22036#[cfg_attr(feature = "ts", derive(TS))]
22037#[cfg_attr(feature = "ts", ts(export))]
22038pub struct OPEN_DRONE_ID_LOCATION_DATA {
22039    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22040    pub latitude: i32,
22041    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22042    pub longitude: i32,
22043    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
22044    pub altitude_barometric: f32,
22045    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
22046    pub altitude_geodetic: f32,
22047    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22048    pub height: f32,
22049    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22050    pub timestamp: f32,
22051    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22052    pub direction: u16,
22053    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22054    pub speed_horizontal: u16,
22055    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22056    pub speed_vertical: i16,
22057    #[doc = "System ID (0 for broadcast)."]
22058    pub target_system: u8,
22059    #[doc = "Component ID (0 for broadcast)."]
22060    pub target_component: u8,
22061    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22062    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22063    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22064    pub id_or_mac: [u8; 20],
22065    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22066    pub status: MavOdidStatus,
22067    #[doc = "Indicates the reference point for the height field."]
22068    pub height_reference: MavOdidHeightRef,
22069    #[doc = "The accuracy of the horizontal position."]
22070    pub horizontal_accuracy: MavOdidHorAcc,
22071    #[doc = "The accuracy of the vertical position."]
22072    pub vertical_accuracy: MavOdidVerAcc,
22073    #[doc = "The accuracy of the barometric altitude."]
22074    pub barometer_accuracy: MavOdidVerAcc,
22075    #[doc = "The accuracy of the horizontal and vertical speed."]
22076    pub speed_accuracy: MavOdidSpeedAcc,
22077    #[doc = "The accuracy of the timestamps."]
22078    pub timestamp_accuracy: MavOdidTimeAcc,
22079}
22080impl OPEN_DRONE_ID_LOCATION_DATA {
22081    pub const ENCODED_LEN: usize = 59usize;
22082    pub const DEFAULT: Self = Self {
22083        latitude: 0_i32,
22084        longitude: 0_i32,
22085        altitude_barometric: 0.0_f32,
22086        altitude_geodetic: 0.0_f32,
22087        height: 0.0_f32,
22088        timestamp: 0.0_f32,
22089        direction: 0_u16,
22090        speed_horizontal: 0_u16,
22091        speed_vertical: 0_i16,
22092        target_system: 0_u8,
22093        target_component: 0_u8,
22094        id_or_mac: [0_u8; 20usize],
22095        status: MavOdidStatus::DEFAULT,
22096        height_reference: MavOdidHeightRef::DEFAULT,
22097        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22098        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22099        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22100        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22101        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22102    };
22103    #[cfg(feature = "arbitrary")]
22104    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22105        use arbitrary::{Arbitrary, Unstructured};
22106        let mut buf = [0u8; 1024];
22107        rng.fill_bytes(&mut buf);
22108        let mut unstructured = Unstructured::new(&buf);
22109        Self::arbitrary(&mut unstructured).unwrap_or_default()
22110    }
22111}
22112impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22113    fn default() -> Self {
22114        Self::DEFAULT.clone()
22115    }
22116}
22117impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22118    type Message = MavMessage;
22119    const ID: u32 = 12901u32;
22120    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22121    const EXTRA_CRC: u8 = 254u8;
22122    const ENCODED_LEN: usize = 59usize;
22123    fn deser(
22124        _version: MavlinkVersion,
22125        __input: &[u8],
22126    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22127        let avail_len = __input.len();
22128        let mut payload_buf = [0; Self::ENCODED_LEN];
22129        let mut buf = if avail_len < Self::ENCODED_LEN {
22130            payload_buf[0..avail_len].copy_from_slice(__input);
22131            Bytes::new(&payload_buf)
22132        } else {
22133            Bytes::new(__input)
22134        };
22135        let mut __struct = Self::default();
22136        __struct.latitude = buf.get_i32_le();
22137        __struct.longitude = buf.get_i32_le();
22138        __struct.altitude_barometric = buf.get_f32_le();
22139        __struct.altitude_geodetic = buf.get_f32_le();
22140        __struct.height = buf.get_f32_le();
22141        __struct.timestamp = buf.get_f32_le();
22142        __struct.direction = buf.get_u16_le();
22143        __struct.speed_horizontal = buf.get_u16_le();
22144        __struct.speed_vertical = buf.get_i16_le();
22145        __struct.target_system = buf.get_u8();
22146        __struct.target_component = buf.get_u8();
22147        for v in &mut __struct.id_or_mac {
22148            let val = buf.get_u8();
22149            *v = val;
22150        }
22151        let tmp = buf.get_u8();
22152        __struct.status =
22153            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22154                enum_type: "MavOdidStatus",
22155                value: tmp as u64,
22156            })?;
22157        let tmp = buf.get_u8();
22158        __struct.height_reference =
22159            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22160                enum_type: "MavOdidHeightRef",
22161                value: tmp as u64,
22162            })?;
22163        let tmp = buf.get_u8();
22164        __struct.horizontal_accuracy =
22165            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22166                enum_type: "MavOdidHorAcc",
22167                value: tmp as u64,
22168            })?;
22169        let tmp = buf.get_u8();
22170        __struct.vertical_accuracy =
22171            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22172                enum_type: "MavOdidVerAcc",
22173                value: tmp as u64,
22174            })?;
22175        let tmp = buf.get_u8();
22176        __struct.barometer_accuracy =
22177            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22178                enum_type: "MavOdidVerAcc",
22179                value: tmp as u64,
22180            })?;
22181        let tmp = buf.get_u8();
22182        __struct.speed_accuracy =
22183            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22184                enum_type: "MavOdidSpeedAcc",
22185                value: tmp as u64,
22186            })?;
22187        let tmp = buf.get_u8();
22188        __struct.timestamp_accuracy =
22189            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22190                enum_type: "MavOdidTimeAcc",
22191                value: tmp as u64,
22192            })?;
22193        Ok(__struct)
22194    }
22195    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22196        let mut __tmp = BytesMut::new(bytes);
22197        #[allow(clippy::absurd_extreme_comparisons)]
22198        #[allow(unused_comparisons)]
22199        if __tmp.remaining() < Self::ENCODED_LEN {
22200            panic!(
22201                "buffer is too small (need {} bytes, but got {})",
22202                Self::ENCODED_LEN,
22203                __tmp.remaining(),
22204            )
22205        }
22206        __tmp.put_i32_le(self.latitude);
22207        __tmp.put_i32_le(self.longitude);
22208        __tmp.put_f32_le(self.altitude_barometric);
22209        __tmp.put_f32_le(self.altitude_geodetic);
22210        __tmp.put_f32_le(self.height);
22211        __tmp.put_f32_le(self.timestamp);
22212        __tmp.put_u16_le(self.direction);
22213        __tmp.put_u16_le(self.speed_horizontal);
22214        __tmp.put_i16_le(self.speed_vertical);
22215        __tmp.put_u8(self.target_system);
22216        __tmp.put_u8(self.target_component);
22217        for val in &self.id_or_mac {
22218            __tmp.put_u8(*val);
22219        }
22220        __tmp.put_u8(self.status as u8);
22221        __tmp.put_u8(self.height_reference as u8);
22222        __tmp.put_u8(self.horizontal_accuracy as u8);
22223        __tmp.put_u8(self.vertical_accuracy as u8);
22224        __tmp.put_u8(self.barometer_accuracy as u8);
22225        __tmp.put_u8(self.speed_accuracy as u8);
22226        __tmp.put_u8(self.timestamp_accuracy as u8);
22227        if matches!(version, MavlinkVersion::V2) {
22228            let len = __tmp.len();
22229            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22230        } else {
22231            __tmp.len()
22232        }
22233    }
22234}
22235#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22236#[doc = ""]
22237#[doc = "ID: 12915"]
22238#[derive(Debug, Clone, PartialEq)]
22239#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22240#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22241#[cfg_attr(feature = "ts", derive(TS))]
22242#[cfg_attr(feature = "ts", ts(export))]
22243pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22244    #[doc = "System ID (0 for broadcast)."]
22245    pub target_system: u8,
22246    #[doc = "Component ID (0 for broadcast)."]
22247    pub target_component: u8,
22248    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22249    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22250    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22251    pub id_or_mac: [u8; 20],
22252    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22253    pub single_message_size: u8,
22254    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22255    pub msg_pack_size: u8,
22256    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22257    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22258    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22259    pub messages: [u8; 225],
22260}
22261impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22262    pub const ENCODED_LEN: usize = 249usize;
22263    pub const DEFAULT: Self = Self {
22264        target_system: 0_u8,
22265        target_component: 0_u8,
22266        id_or_mac: [0_u8; 20usize],
22267        single_message_size: 0_u8,
22268        msg_pack_size: 0_u8,
22269        messages: [0_u8; 225usize],
22270    };
22271    #[cfg(feature = "arbitrary")]
22272    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22273        use arbitrary::{Arbitrary, Unstructured};
22274        let mut buf = [0u8; 1024];
22275        rng.fill_bytes(&mut buf);
22276        let mut unstructured = Unstructured::new(&buf);
22277        Self::arbitrary(&mut unstructured).unwrap_or_default()
22278    }
22279}
22280impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22281    fn default() -> Self {
22282        Self::DEFAULT.clone()
22283    }
22284}
22285impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22286    type Message = MavMessage;
22287    const ID: u32 = 12915u32;
22288    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22289    const EXTRA_CRC: u8 = 94u8;
22290    const ENCODED_LEN: usize = 249usize;
22291    fn deser(
22292        _version: MavlinkVersion,
22293        __input: &[u8],
22294    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22295        let avail_len = __input.len();
22296        let mut payload_buf = [0; Self::ENCODED_LEN];
22297        let mut buf = if avail_len < Self::ENCODED_LEN {
22298            payload_buf[0..avail_len].copy_from_slice(__input);
22299            Bytes::new(&payload_buf)
22300        } else {
22301            Bytes::new(__input)
22302        };
22303        let mut __struct = Self::default();
22304        __struct.target_system = buf.get_u8();
22305        __struct.target_component = buf.get_u8();
22306        for v in &mut __struct.id_or_mac {
22307            let val = buf.get_u8();
22308            *v = val;
22309        }
22310        __struct.single_message_size = buf.get_u8();
22311        __struct.msg_pack_size = buf.get_u8();
22312        for v in &mut __struct.messages {
22313            let val = buf.get_u8();
22314            *v = val;
22315        }
22316        Ok(__struct)
22317    }
22318    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22319        let mut __tmp = BytesMut::new(bytes);
22320        #[allow(clippy::absurd_extreme_comparisons)]
22321        #[allow(unused_comparisons)]
22322        if __tmp.remaining() < Self::ENCODED_LEN {
22323            panic!(
22324                "buffer is too small (need {} bytes, but got {})",
22325                Self::ENCODED_LEN,
22326                __tmp.remaining(),
22327            )
22328        }
22329        __tmp.put_u8(self.target_system);
22330        __tmp.put_u8(self.target_component);
22331        for val in &self.id_or_mac {
22332            __tmp.put_u8(*val);
22333        }
22334        __tmp.put_u8(self.single_message_size);
22335        __tmp.put_u8(self.msg_pack_size);
22336        for val in &self.messages {
22337            __tmp.put_u8(*val);
22338        }
22339        if matches!(version, MavlinkVersion::V2) {
22340            let len = __tmp.len();
22341            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22342        } else {
22343            __tmp.len()
22344        }
22345    }
22346}
22347#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22348#[doc = ""]
22349#[doc = "ID: 12905"]
22350#[derive(Debug, Clone, PartialEq)]
22351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22352#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22353#[cfg_attr(feature = "ts", derive(TS))]
22354#[cfg_attr(feature = "ts", ts(export))]
22355pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22356    #[doc = "System ID (0 for broadcast)."]
22357    pub target_system: u8,
22358    #[doc = "Component ID (0 for broadcast)."]
22359    pub target_component: u8,
22360    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22361    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22362    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22363    pub id_or_mac: [u8; 20],
22364    #[doc = "Indicates the type of the operator_id field."]
22365    pub operator_id_type: MavOdidOperatorIdType,
22366    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22367    #[cfg_attr(feature = "ts", ts(type = "string"))]
22368    pub operator_id: CharArray<20>,
22369}
22370impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22371    pub const ENCODED_LEN: usize = 43usize;
22372    pub const DEFAULT: Self = Self {
22373        target_system: 0_u8,
22374        target_component: 0_u8,
22375        id_or_mac: [0_u8; 20usize],
22376        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22377        operator_id: CharArray::new([0_u8; 20usize]),
22378    };
22379    #[cfg(feature = "arbitrary")]
22380    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22381        use arbitrary::{Arbitrary, Unstructured};
22382        let mut buf = [0u8; 1024];
22383        rng.fill_bytes(&mut buf);
22384        let mut unstructured = Unstructured::new(&buf);
22385        Self::arbitrary(&mut unstructured).unwrap_or_default()
22386    }
22387}
22388impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22389    fn default() -> Self {
22390        Self::DEFAULT.clone()
22391    }
22392}
22393impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22394    type Message = MavMessage;
22395    const ID: u32 = 12905u32;
22396    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22397    const EXTRA_CRC: u8 = 49u8;
22398    const ENCODED_LEN: usize = 43usize;
22399    fn deser(
22400        _version: MavlinkVersion,
22401        __input: &[u8],
22402    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22403        let avail_len = __input.len();
22404        let mut payload_buf = [0; Self::ENCODED_LEN];
22405        let mut buf = if avail_len < Self::ENCODED_LEN {
22406            payload_buf[0..avail_len].copy_from_slice(__input);
22407            Bytes::new(&payload_buf)
22408        } else {
22409            Bytes::new(__input)
22410        };
22411        let mut __struct = Self::default();
22412        __struct.target_system = buf.get_u8();
22413        __struct.target_component = buf.get_u8();
22414        for v in &mut __struct.id_or_mac {
22415            let val = buf.get_u8();
22416            *v = val;
22417        }
22418        let tmp = buf.get_u8();
22419        __struct.operator_id_type =
22420            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22421                enum_type: "MavOdidOperatorIdType",
22422                value: tmp as u64,
22423            })?;
22424        let mut tmp = [0_u8; 20usize];
22425        for v in &mut tmp {
22426            *v = buf.get_u8();
22427        }
22428        __struct.operator_id = CharArray::new(tmp);
22429        Ok(__struct)
22430    }
22431    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22432        let mut __tmp = BytesMut::new(bytes);
22433        #[allow(clippy::absurd_extreme_comparisons)]
22434        #[allow(unused_comparisons)]
22435        if __tmp.remaining() < Self::ENCODED_LEN {
22436            panic!(
22437                "buffer is too small (need {} bytes, but got {})",
22438                Self::ENCODED_LEN,
22439                __tmp.remaining(),
22440            )
22441        }
22442        __tmp.put_u8(self.target_system);
22443        __tmp.put_u8(self.target_component);
22444        for val in &self.id_or_mac {
22445            __tmp.put_u8(*val);
22446        }
22447        __tmp.put_u8(self.operator_id_type as u8);
22448        for val in &self.operator_id {
22449            __tmp.put_u8(*val);
22450        }
22451        if matches!(version, MavlinkVersion::V2) {
22452            let len = __tmp.len();
22453            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22454        } else {
22455            __tmp.len()
22456        }
22457    }
22458}
22459#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22460#[doc = ""]
22461#[doc = "ID: 12903"]
22462#[derive(Debug, Clone, PartialEq)]
22463#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22464#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22465#[cfg_attr(feature = "ts", derive(TS))]
22466#[cfg_attr(feature = "ts", ts(export))]
22467pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22468    #[doc = "System ID (0 for broadcast)."]
22469    pub target_system: u8,
22470    #[doc = "Component ID (0 for broadcast)."]
22471    pub target_component: u8,
22472    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22473    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22474    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22475    pub id_or_mac: [u8; 20],
22476    #[doc = "Indicates the type of the description field."]
22477    pub description_type: MavOdidDescType,
22478    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22479    #[cfg_attr(feature = "ts", ts(type = "string"))]
22480    pub description: CharArray<23>,
22481}
22482impl OPEN_DRONE_ID_SELF_ID_DATA {
22483    pub const ENCODED_LEN: usize = 46usize;
22484    pub const DEFAULT: Self = Self {
22485        target_system: 0_u8,
22486        target_component: 0_u8,
22487        id_or_mac: [0_u8; 20usize],
22488        description_type: MavOdidDescType::DEFAULT,
22489        description: CharArray::new([0_u8; 23usize]),
22490    };
22491    #[cfg(feature = "arbitrary")]
22492    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22493        use arbitrary::{Arbitrary, Unstructured};
22494        let mut buf = [0u8; 1024];
22495        rng.fill_bytes(&mut buf);
22496        let mut unstructured = Unstructured::new(&buf);
22497        Self::arbitrary(&mut unstructured).unwrap_or_default()
22498    }
22499}
22500impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22501    fn default() -> Self {
22502        Self::DEFAULT.clone()
22503    }
22504}
22505impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22506    type Message = MavMessage;
22507    const ID: u32 = 12903u32;
22508    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22509    const EXTRA_CRC: u8 = 249u8;
22510    const ENCODED_LEN: usize = 46usize;
22511    fn deser(
22512        _version: MavlinkVersion,
22513        __input: &[u8],
22514    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22515        let avail_len = __input.len();
22516        let mut payload_buf = [0; Self::ENCODED_LEN];
22517        let mut buf = if avail_len < Self::ENCODED_LEN {
22518            payload_buf[0..avail_len].copy_from_slice(__input);
22519            Bytes::new(&payload_buf)
22520        } else {
22521            Bytes::new(__input)
22522        };
22523        let mut __struct = Self::default();
22524        __struct.target_system = buf.get_u8();
22525        __struct.target_component = buf.get_u8();
22526        for v in &mut __struct.id_or_mac {
22527            let val = buf.get_u8();
22528            *v = val;
22529        }
22530        let tmp = buf.get_u8();
22531        __struct.description_type =
22532            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22533                enum_type: "MavOdidDescType",
22534                value: tmp as u64,
22535            })?;
22536        let mut tmp = [0_u8; 23usize];
22537        for v in &mut tmp {
22538            *v = buf.get_u8();
22539        }
22540        __struct.description = CharArray::new(tmp);
22541        Ok(__struct)
22542    }
22543    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22544        let mut __tmp = BytesMut::new(bytes);
22545        #[allow(clippy::absurd_extreme_comparisons)]
22546        #[allow(unused_comparisons)]
22547        if __tmp.remaining() < Self::ENCODED_LEN {
22548            panic!(
22549                "buffer is too small (need {} bytes, but got {})",
22550                Self::ENCODED_LEN,
22551                __tmp.remaining(),
22552            )
22553        }
22554        __tmp.put_u8(self.target_system);
22555        __tmp.put_u8(self.target_component);
22556        for val in &self.id_or_mac {
22557            __tmp.put_u8(*val);
22558        }
22559        __tmp.put_u8(self.description_type as u8);
22560        for val in &self.description {
22561            __tmp.put_u8(*val);
22562        }
22563        if matches!(version, MavlinkVersion::V2) {
22564            let len = __tmp.len();
22565            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22566        } else {
22567            __tmp.len()
22568        }
22569    }
22570}
22571#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22572#[doc = ""]
22573#[doc = "ID: 12904"]
22574#[derive(Debug, Clone, PartialEq)]
22575#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22576#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22577#[cfg_attr(feature = "ts", derive(TS))]
22578#[cfg_attr(feature = "ts", ts(export))]
22579pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22580    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22581    pub operator_latitude: i32,
22582    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22583    pub operator_longitude: i32,
22584    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22585    pub area_ceiling: f32,
22586    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22587    pub area_floor: f32,
22588    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22589    pub operator_altitude_geo: f32,
22590    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22591    pub timestamp: u32,
22592    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22593    pub area_count: u16,
22594    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22595    pub area_radius: u16,
22596    #[doc = "System ID (0 for broadcast)."]
22597    pub target_system: u8,
22598    #[doc = "Component ID (0 for broadcast)."]
22599    pub target_component: u8,
22600    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22601    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22602    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22603    pub id_or_mac: [u8; 20],
22604    #[doc = "Specifies the operator location type."]
22605    pub operator_location_type: MavOdidOperatorLocationType,
22606    #[doc = "Specifies the classification type of the UA."]
22607    pub classification_type: MavOdidClassificationType,
22608    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22609    pub category_eu: MavOdidCategoryEu,
22610    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22611    pub class_eu: MavOdidClassEu,
22612}
22613impl OPEN_DRONE_ID_SYSTEM_DATA {
22614    pub const ENCODED_LEN: usize = 54usize;
22615    pub const DEFAULT: Self = Self {
22616        operator_latitude: 0_i32,
22617        operator_longitude: 0_i32,
22618        area_ceiling: 0.0_f32,
22619        area_floor: 0.0_f32,
22620        operator_altitude_geo: 0.0_f32,
22621        timestamp: 0_u32,
22622        area_count: 0_u16,
22623        area_radius: 0_u16,
22624        target_system: 0_u8,
22625        target_component: 0_u8,
22626        id_or_mac: [0_u8; 20usize],
22627        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22628        classification_type: MavOdidClassificationType::DEFAULT,
22629        category_eu: MavOdidCategoryEu::DEFAULT,
22630        class_eu: MavOdidClassEu::DEFAULT,
22631    };
22632    #[cfg(feature = "arbitrary")]
22633    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22634        use arbitrary::{Arbitrary, Unstructured};
22635        let mut buf = [0u8; 1024];
22636        rng.fill_bytes(&mut buf);
22637        let mut unstructured = Unstructured::new(&buf);
22638        Self::arbitrary(&mut unstructured).unwrap_or_default()
22639    }
22640}
22641impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22642    fn default() -> Self {
22643        Self::DEFAULT.clone()
22644    }
22645}
22646impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22647    type Message = MavMessage;
22648    const ID: u32 = 12904u32;
22649    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22650    const EXTRA_CRC: u8 = 77u8;
22651    const ENCODED_LEN: usize = 54usize;
22652    fn deser(
22653        _version: MavlinkVersion,
22654        __input: &[u8],
22655    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22656        let avail_len = __input.len();
22657        let mut payload_buf = [0; Self::ENCODED_LEN];
22658        let mut buf = if avail_len < Self::ENCODED_LEN {
22659            payload_buf[0..avail_len].copy_from_slice(__input);
22660            Bytes::new(&payload_buf)
22661        } else {
22662            Bytes::new(__input)
22663        };
22664        let mut __struct = Self::default();
22665        __struct.operator_latitude = buf.get_i32_le();
22666        __struct.operator_longitude = buf.get_i32_le();
22667        __struct.area_ceiling = buf.get_f32_le();
22668        __struct.area_floor = buf.get_f32_le();
22669        __struct.operator_altitude_geo = buf.get_f32_le();
22670        __struct.timestamp = buf.get_u32_le();
22671        __struct.area_count = buf.get_u16_le();
22672        __struct.area_radius = buf.get_u16_le();
22673        __struct.target_system = buf.get_u8();
22674        __struct.target_component = buf.get_u8();
22675        for v in &mut __struct.id_or_mac {
22676            let val = buf.get_u8();
22677            *v = val;
22678        }
22679        let tmp = buf.get_u8();
22680        __struct.operator_location_type =
22681            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22682                enum_type: "MavOdidOperatorLocationType",
22683                value: tmp as u64,
22684            })?;
22685        let tmp = buf.get_u8();
22686        __struct.classification_type =
22687            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22688                enum_type: "MavOdidClassificationType",
22689                value: tmp as u64,
22690            })?;
22691        let tmp = buf.get_u8();
22692        __struct.category_eu =
22693            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22694                enum_type: "MavOdidCategoryEu",
22695                value: tmp as u64,
22696            })?;
22697        let tmp = buf.get_u8();
22698        __struct.class_eu =
22699            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22700                enum_type: "MavOdidClassEu",
22701                value: tmp as u64,
22702            })?;
22703        Ok(__struct)
22704    }
22705    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22706        let mut __tmp = BytesMut::new(bytes);
22707        #[allow(clippy::absurd_extreme_comparisons)]
22708        #[allow(unused_comparisons)]
22709        if __tmp.remaining() < Self::ENCODED_LEN {
22710            panic!(
22711                "buffer is too small (need {} bytes, but got {})",
22712                Self::ENCODED_LEN,
22713                __tmp.remaining(),
22714            )
22715        }
22716        __tmp.put_i32_le(self.operator_latitude);
22717        __tmp.put_i32_le(self.operator_longitude);
22718        __tmp.put_f32_le(self.area_ceiling);
22719        __tmp.put_f32_le(self.area_floor);
22720        __tmp.put_f32_le(self.operator_altitude_geo);
22721        __tmp.put_u32_le(self.timestamp);
22722        __tmp.put_u16_le(self.area_count);
22723        __tmp.put_u16_le(self.area_radius);
22724        __tmp.put_u8(self.target_system);
22725        __tmp.put_u8(self.target_component);
22726        for val in &self.id_or_mac {
22727            __tmp.put_u8(*val);
22728        }
22729        __tmp.put_u8(self.operator_location_type as u8);
22730        __tmp.put_u8(self.classification_type as u8);
22731        __tmp.put_u8(self.category_eu as u8);
22732        __tmp.put_u8(self.class_eu as u8);
22733        if matches!(version, MavlinkVersion::V2) {
22734            let len = __tmp.len();
22735            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22736        } else {
22737            __tmp.len()
22738        }
22739    }
22740}
22741#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22742#[doc = ""]
22743#[doc = "ID: 12919"]
22744#[derive(Debug, Clone, PartialEq)]
22745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22746#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22747#[cfg_attr(feature = "ts", derive(TS))]
22748#[cfg_attr(feature = "ts", ts(export))]
22749pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22750    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22751    pub operator_latitude: i32,
22752    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22753    pub operator_longitude: i32,
22754    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22755    pub operator_altitude_geo: f32,
22756    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22757    pub timestamp: u32,
22758    #[doc = "System ID (0 for broadcast)."]
22759    pub target_system: u8,
22760    #[doc = "Component ID (0 for broadcast)."]
22761    pub target_component: u8,
22762}
22763impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22764    pub const ENCODED_LEN: usize = 18usize;
22765    pub const DEFAULT: Self = Self {
22766        operator_latitude: 0_i32,
22767        operator_longitude: 0_i32,
22768        operator_altitude_geo: 0.0_f32,
22769        timestamp: 0_u32,
22770        target_system: 0_u8,
22771        target_component: 0_u8,
22772    };
22773    #[cfg(feature = "arbitrary")]
22774    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22775        use arbitrary::{Arbitrary, Unstructured};
22776        let mut buf = [0u8; 1024];
22777        rng.fill_bytes(&mut buf);
22778        let mut unstructured = Unstructured::new(&buf);
22779        Self::arbitrary(&mut unstructured).unwrap_or_default()
22780    }
22781}
22782impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22783    fn default() -> Self {
22784        Self::DEFAULT.clone()
22785    }
22786}
22787impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22788    type Message = MavMessage;
22789    const ID: u32 = 12919u32;
22790    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
22791    const EXTRA_CRC: u8 = 7u8;
22792    const ENCODED_LEN: usize = 18usize;
22793    fn deser(
22794        _version: MavlinkVersion,
22795        __input: &[u8],
22796    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22797        let avail_len = __input.len();
22798        let mut payload_buf = [0; Self::ENCODED_LEN];
22799        let mut buf = if avail_len < Self::ENCODED_LEN {
22800            payload_buf[0..avail_len].copy_from_slice(__input);
22801            Bytes::new(&payload_buf)
22802        } else {
22803            Bytes::new(__input)
22804        };
22805        let mut __struct = Self::default();
22806        __struct.operator_latitude = buf.get_i32_le();
22807        __struct.operator_longitude = buf.get_i32_le();
22808        __struct.operator_altitude_geo = buf.get_f32_le();
22809        __struct.timestamp = buf.get_u32_le();
22810        __struct.target_system = buf.get_u8();
22811        __struct.target_component = buf.get_u8();
22812        Ok(__struct)
22813    }
22814    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22815        let mut __tmp = BytesMut::new(bytes);
22816        #[allow(clippy::absurd_extreme_comparisons)]
22817        #[allow(unused_comparisons)]
22818        if __tmp.remaining() < Self::ENCODED_LEN {
22819            panic!(
22820                "buffer is too small (need {} bytes, but got {})",
22821                Self::ENCODED_LEN,
22822                __tmp.remaining(),
22823            )
22824        }
22825        __tmp.put_i32_le(self.operator_latitude);
22826        __tmp.put_i32_le(self.operator_longitude);
22827        __tmp.put_f32_le(self.operator_altitude_geo);
22828        __tmp.put_u32_le(self.timestamp);
22829        __tmp.put_u8(self.target_system);
22830        __tmp.put_u8(self.target_component);
22831        if matches!(version, MavlinkVersion::V2) {
22832            let len = __tmp.len();
22833            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22834        } else {
22835            __tmp.len()
22836        }
22837    }
22838}
22839#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
22840#[doc = ""]
22841#[doc = "ID: 100"]
22842#[derive(Debug, Clone, PartialEq)]
22843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22845#[cfg_attr(feature = "ts", derive(TS))]
22846#[cfg_attr(feature = "ts", ts(export))]
22847pub struct OPTICAL_FLOW_DATA {
22848    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22849    pub time_usec: u64,
22850    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
22851    pub flow_comp_m_x: f32,
22852    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
22853    pub flow_comp_m_y: f32,
22854    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
22855    pub ground_distance: f32,
22856    #[doc = "Flow in x-sensor direction"]
22857    pub flow_x: i16,
22858    #[doc = "Flow in y-sensor direction"]
22859    pub flow_y: i16,
22860    #[doc = "Sensor ID"]
22861    pub sensor_id: u8,
22862    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
22863    pub quality: u8,
22864    #[doc = "Flow rate about X axis"]
22865    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22866    pub flow_rate_x: f32,
22867    #[doc = "Flow rate about Y axis"]
22868    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22869    pub flow_rate_y: f32,
22870}
22871impl OPTICAL_FLOW_DATA {
22872    pub const ENCODED_LEN: usize = 34usize;
22873    pub const DEFAULT: Self = Self {
22874        time_usec: 0_u64,
22875        flow_comp_m_x: 0.0_f32,
22876        flow_comp_m_y: 0.0_f32,
22877        ground_distance: 0.0_f32,
22878        flow_x: 0_i16,
22879        flow_y: 0_i16,
22880        sensor_id: 0_u8,
22881        quality: 0_u8,
22882        flow_rate_x: 0.0_f32,
22883        flow_rate_y: 0.0_f32,
22884    };
22885    #[cfg(feature = "arbitrary")]
22886    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22887        use arbitrary::{Arbitrary, Unstructured};
22888        let mut buf = [0u8; 1024];
22889        rng.fill_bytes(&mut buf);
22890        let mut unstructured = Unstructured::new(&buf);
22891        Self::arbitrary(&mut unstructured).unwrap_or_default()
22892    }
22893}
22894impl Default for OPTICAL_FLOW_DATA {
22895    fn default() -> Self {
22896        Self::DEFAULT.clone()
22897    }
22898}
22899impl MessageData for OPTICAL_FLOW_DATA {
22900    type Message = MavMessage;
22901    const ID: u32 = 100u32;
22902    const NAME: &'static str = "OPTICAL_FLOW";
22903    const EXTRA_CRC: u8 = 175u8;
22904    const ENCODED_LEN: usize = 34usize;
22905    fn deser(
22906        _version: MavlinkVersion,
22907        __input: &[u8],
22908    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22909        let avail_len = __input.len();
22910        let mut payload_buf = [0; Self::ENCODED_LEN];
22911        let mut buf = if avail_len < Self::ENCODED_LEN {
22912            payload_buf[0..avail_len].copy_from_slice(__input);
22913            Bytes::new(&payload_buf)
22914        } else {
22915            Bytes::new(__input)
22916        };
22917        let mut __struct = Self::default();
22918        __struct.time_usec = buf.get_u64_le();
22919        __struct.flow_comp_m_x = buf.get_f32_le();
22920        __struct.flow_comp_m_y = buf.get_f32_le();
22921        __struct.ground_distance = buf.get_f32_le();
22922        __struct.flow_x = buf.get_i16_le();
22923        __struct.flow_y = buf.get_i16_le();
22924        __struct.sensor_id = buf.get_u8();
22925        __struct.quality = buf.get_u8();
22926        __struct.flow_rate_x = buf.get_f32_le();
22927        __struct.flow_rate_y = buf.get_f32_le();
22928        Ok(__struct)
22929    }
22930    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22931        let mut __tmp = BytesMut::new(bytes);
22932        #[allow(clippy::absurd_extreme_comparisons)]
22933        #[allow(unused_comparisons)]
22934        if __tmp.remaining() < Self::ENCODED_LEN {
22935            panic!(
22936                "buffer is too small (need {} bytes, but got {})",
22937                Self::ENCODED_LEN,
22938                __tmp.remaining(),
22939            )
22940        }
22941        __tmp.put_u64_le(self.time_usec);
22942        __tmp.put_f32_le(self.flow_comp_m_x);
22943        __tmp.put_f32_le(self.flow_comp_m_y);
22944        __tmp.put_f32_le(self.ground_distance);
22945        __tmp.put_i16_le(self.flow_x);
22946        __tmp.put_i16_le(self.flow_y);
22947        __tmp.put_u8(self.sensor_id);
22948        __tmp.put_u8(self.quality);
22949        if matches!(version, MavlinkVersion::V2) {
22950            __tmp.put_f32_le(self.flow_rate_x);
22951            __tmp.put_f32_le(self.flow_rate_y);
22952            let len = __tmp.len();
22953            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22954        } else {
22955            __tmp.len()
22956        }
22957    }
22958}
22959#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22960#[doc = ""]
22961#[doc = "ID: 106"]
22962#[derive(Debug, Clone, PartialEq)]
22963#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22964#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22965#[cfg_attr(feature = "ts", derive(TS))]
22966#[cfg_attr(feature = "ts", ts(export))]
22967pub struct OPTICAL_FLOW_RAD_DATA {
22968    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22969    pub time_usec: u64,
22970    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22971    pub integration_time_us: u32,
22972    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22973    pub integrated_x: f32,
22974    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22975    pub integrated_y: f32,
22976    #[doc = "RH rotation around X axis"]
22977    pub integrated_xgyro: f32,
22978    #[doc = "RH rotation around Y axis"]
22979    pub integrated_ygyro: f32,
22980    #[doc = "RH rotation around Z axis"]
22981    pub integrated_zgyro: f32,
22982    #[doc = "Time since the distance was sampled."]
22983    pub time_delta_distance_us: u32,
22984    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22985    pub distance: f32,
22986    #[doc = "Temperature"]
22987    pub temperature: i16,
22988    #[doc = "Sensor ID"]
22989    pub sensor_id: u8,
22990    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22991    pub quality: u8,
22992}
22993impl OPTICAL_FLOW_RAD_DATA {
22994    pub const ENCODED_LEN: usize = 44usize;
22995    pub const DEFAULT: Self = Self {
22996        time_usec: 0_u64,
22997        integration_time_us: 0_u32,
22998        integrated_x: 0.0_f32,
22999        integrated_y: 0.0_f32,
23000        integrated_xgyro: 0.0_f32,
23001        integrated_ygyro: 0.0_f32,
23002        integrated_zgyro: 0.0_f32,
23003        time_delta_distance_us: 0_u32,
23004        distance: 0.0_f32,
23005        temperature: 0_i16,
23006        sensor_id: 0_u8,
23007        quality: 0_u8,
23008    };
23009    #[cfg(feature = "arbitrary")]
23010    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23011        use arbitrary::{Arbitrary, Unstructured};
23012        let mut buf = [0u8; 1024];
23013        rng.fill_bytes(&mut buf);
23014        let mut unstructured = Unstructured::new(&buf);
23015        Self::arbitrary(&mut unstructured).unwrap_or_default()
23016    }
23017}
23018impl Default for OPTICAL_FLOW_RAD_DATA {
23019    fn default() -> Self {
23020        Self::DEFAULT.clone()
23021    }
23022}
23023impl MessageData for OPTICAL_FLOW_RAD_DATA {
23024    type Message = MavMessage;
23025    const ID: u32 = 106u32;
23026    const NAME: &'static str = "OPTICAL_FLOW_RAD";
23027    const EXTRA_CRC: u8 = 138u8;
23028    const ENCODED_LEN: usize = 44usize;
23029    fn deser(
23030        _version: MavlinkVersion,
23031        __input: &[u8],
23032    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23033        let avail_len = __input.len();
23034        let mut payload_buf = [0; Self::ENCODED_LEN];
23035        let mut buf = if avail_len < Self::ENCODED_LEN {
23036            payload_buf[0..avail_len].copy_from_slice(__input);
23037            Bytes::new(&payload_buf)
23038        } else {
23039            Bytes::new(__input)
23040        };
23041        let mut __struct = Self::default();
23042        __struct.time_usec = buf.get_u64_le();
23043        __struct.integration_time_us = buf.get_u32_le();
23044        __struct.integrated_x = buf.get_f32_le();
23045        __struct.integrated_y = buf.get_f32_le();
23046        __struct.integrated_xgyro = buf.get_f32_le();
23047        __struct.integrated_ygyro = buf.get_f32_le();
23048        __struct.integrated_zgyro = buf.get_f32_le();
23049        __struct.time_delta_distance_us = buf.get_u32_le();
23050        __struct.distance = buf.get_f32_le();
23051        __struct.temperature = buf.get_i16_le();
23052        __struct.sensor_id = buf.get_u8();
23053        __struct.quality = buf.get_u8();
23054        Ok(__struct)
23055    }
23056    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23057        let mut __tmp = BytesMut::new(bytes);
23058        #[allow(clippy::absurd_extreme_comparisons)]
23059        #[allow(unused_comparisons)]
23060        if __tmp.remaining() < Self::ENCODED_LEN {
23061            panic!(
23062                "buffer is too small (need {} bytes, but got {})",
23063                Self::ENCODED_LEN,
23064                __tmp.remaining(),
23065            )
23066        }
23067        __tmp.put_u64_le(self.time_usec);
23068        __tmp.put_u32_le(self.integration_time_us);
23069        __tmp.put_f32_le(self.integrated_x);
23070        __tmp.put_f32_le(self.integrated_y);
23071        __tmp.put_f32_le(self.integrated_xgyro);
23072        __tmp.put_f32_le(self.integrated_ygyro);
23073        __tmp.put_f32_le(self.integrated_zgyro);
23074        __tmp.put_u32_le(self.time_delta_distance_us);
23075        __tmp.put_f32_le(self.distance);
23076        __tmp.put_i16_le(self.temperature);
23077        __tmp.put_u8(self.sensor_id);
23078        __tmp.put_u8(self.quality);
23079        if matches!(version, MavlinkVersion::V2) {
23080            let len = __tmp.len();
23081            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23082        } else {
23083            __tmp.len()
23084        }
23085    }
23086}
23087#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23088#[doc = ""]
23089#[doc = "ID: 360"]
23090#[derive(Debug, Clone, PartialEq)]
23091#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23092#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23093#[cfg_attr(feature = "ts", derive(TS))]
23094#[cfg_attr(feature = "ts", ts(export))]
23095pub struct ORBIT_EXECUTION_STATUS_DATA {
23096    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23097    pub time_usec: u64,
23098    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23099    pub radius: f32,
23100    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23101    pub x: i32,
23102    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23103    pub y: i32,
23104    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23105    pub z: f32,
23106    #[doc = "The coordinate system of the fields: x, y, z."]
23107    pub frame: MavFrame,
23108}
23109impl ORBIT_EXECUTION_STATUS_DATA {
23110    pub const ENCODED_LEN: usize = 25usize;
23111    pub const DEFAULT: Self = Self {
23112        time_usec: 0_u64,
23113        radius: 0.0_f32,
23114        x: 0_i32,
23115        y: 0_i32,
23116        z: 0.0_f32,
23117        frame: MavFrame::DEFAULT,
23118    };
23119    #[cfg(feature = "arbitrary")]
23120    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23121        use arbitrary::{Arbitrary, Unstructured};
23122        let mut buf = [0u8; 1024];
23123        rng.fill_bytes(&mut buf);
23124        let mut unstructured = Unstructured::new(&buf);
23125        Self::arbitrary(&mut unstructured).unwrap_or_default()
23126    }
23127}
23128impl Default for ORBIT_EXECUTION_STATUS_DATA {
23129    fn default() -> Self {
23130        Self::DEFAULT.clone()
23131    }
23132}
23133impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23134    type Message = MavMessage;
23135    const ID: u32 = 360u32;
23136    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23137    const EXTRA_CRC: u8 = 11u8;
23138    const ENCODED_LEN: usize = 25usize;
23139    fn deser(
23140        _version: MavlinkVersion,
23141        __input: &[u8],
23142    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23143        let avail_len = __input.len();
23144        let mut payload_buf = [0; Self::ENCODED_LEN];
23145        let mut buf = if avail_len < Self::ENCODED_LEN {
23146            payload_buf[0..avail_len].copy_from_slice(__input);
23147            Bytes::new(&payload_buf)
23148        } else {
23149            Bytes::new(__input)
23150        };
23151        let mut __struct = Self::default();
23152        __struct.time_usec = buf.get_u64_le();
23153        __struct.radius = buf.get_f32_le();
23154        __struct.x = buf.get_i32_le();
23155        __struct.y = buf.get_i32_le();
23156        __struct.z = buf.get_f32_le();
23157        let tmp = buf.get_u8();
23158        __struct.frame =
23159            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23160                enum_type: "MavFrame",
23161                value: tmp as u64,
23162            })?;
23163        Ok(__struct)
23164    }
23165    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23166        let mut __tmp = BytesMut::new(bytes);
23167        #[allow(clippy::absurd_extreme_comparisons)]
23168        #[allow(unused_comparisons)]
23169        if __tmp.remaining() < Self::ENCODED_LEN {
23170            panic!(
23171                "buffer is too small (need {} bytes, but got {})",
23172                Self::ENCODED_LEN,
23173                __tmp.remaining(),
23174            )
23175        }
23176        __tmp.put_u64_le(self.time_usec);
23177        __tmp.put_f32_le(self.radius);
23178        __tmp.put_i32_le(self.x);
23179        __tmp.put_i32_le(self.y);
23180        __tmp.put_f32_le(self.z);
23181        __tmp.put_u8(self.frame as u8);
23182        if matches!(version, MavlinkVersion::V2) {
23183            let len = __tmp.len();
23184            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23185        } else {
23186            __tmp.len()
23187        }
23188    }
23189}
23190#[doc = "Response from a PARAM_EXT_SET message."]
23191#[doc = ""]
23192#[doc = "ID: 324"]
23193#[derive(Debug, Clone, PartialEq)]
23194#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23196#[cfg_attr(feature = "ts", derive(TS))]
23197#[cfg_attr(feature = "ts", ts(export))]
23198pub struct PARAM_EXT_ACK_DATA {
23199    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23200    #[cfg_attr(feature = "ts", ts(type = "string"))]
23201    pub param_id: CharArray<16>,
23202    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23203    #[cfg_attr(feature = "ts", ts(type = "string"))]
23204    pub param_value: CharArray<128>,
23205    #[doc = "Parameter type."]
23206    pub param_type: MavParamExtType,
23207    #[doc = "Result code."]
23208    pub param_result: ParamAck,
23209}
23210impl PARAM_EXT_ACK_DATA {
23211    pub const ENCODED_LEN: usize = 146usize;
23212    pub const DEFAULT: Self = Self {
23213        param_id: CharArray::new([0_u8; 16usize]),
23214        param_value: CharArray::new([0_u8; 128usize]),
23215        param_type: MavParamExtType::DEFAULT,
23216        param_result: ParamAck::DEFAULT,
23217    };
23218    #[cfg(feature = "arbitrary")]
23219    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23220        use arbitrary::{Arbitrary, Unstructured};
23221        let mut buf = [0u8; 1024];
23222        rng.fill_bytes(&mut buf);
23223        let mut unstructured = Unstructured::new(&buf);
23224        Self::arbitrary(&mut unstructured).unwrap_or_default()
23225    }
23226}
23227impl Default for PARAM_EXT_ACK_DATA {
23228    fn default() -> Self {
23229        Self::DEFAULT.clone()
23230    }
23231}
23232impl MessageData for PARAM_EXT_ACK_DATA {
23233    type Message = MavMessage;
23234    const ID: u32 = 324u32;
23235    const NAME: &'static str = "PARAM_EXT_ACK";
23236    const EXTRA_CRC: u8 = 132u8;
23237    const ENCODED_LEN: usize = 146usize;
23238    fn deser(
23239        _version: MavlinkVersion,
23240        __input: &[u8],
23241    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23242        let avail_len = __input.len();
23243        let mut payload_buf = [0; Self::ENCODED_LEN];
23244        let mut buf = if avail_len < Self::ENCODED_LEN {
23245            payload_buf[0..avail_len].copy_from_slice(__input);
23246            Bytes::new(&payload_buf)
23247        } else {
23248            Bytes::new(__input)
23249        };
23250        let mut __struct = Self::default();
23251        let mut tmp = [0_u8; 16usize];
23252        for v in &mut tmp {
23253            *v = buf.get_u8();
23254        }
23255        __struct.param_id = CharArray::new(tmp);
23256        let mut tmp = [0_u8; 128usize];
23257        for v in &mut tmp {
23258            *v = buf.get_u8();
23259        }
23260        __struct.param_value = CharArray::new(tmp);
23261        let tmp = buf.get_u8();
23262        __struct.param_type =
23263            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23264                enum_type: "MavParamExtType",
23265                value: tmp as u64,
23266            })?;
23267        let tmp = buf.get_u8();
23268        __struct.param_result =
23269            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23270                enum_type: "ParamAck",
23271                value: tmp as u64,
23272            })?;
23273        Ok(__struct)
23274    }
23275    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23276        let mut __tmp = BytesMut::new(bytes);
23277        #[allow(clippy::absurd_extreme_comparisons)]
23278        #[allow(unused_comparisons)]
23279        if __tmp.remaining() < Self::ENCODED_LEN {
23280            panic!(
23281                "buffer is too small (need {} bytes, but got {})",
23282                Self::ENCODED_LEN,
23283                __tmp.remaining(),
23284            )
23285        }
23286        for val in &self.param_id {
23287            __tmp.put_u8(*val);
23288        }
23289        for val in &self.param_value {
23290            __tmp.put_u8(*val);
23291        }
23292        __tmp.put_u8(self.param_type as u8);
23293        __tmp.put_u8(self.param_result as u8);
23294        if matches!(version, MavlinkVersion::V2) {
23295            let len = __tmp.len();
23296            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23297        } else {
23298            __tmp.len()
23299        }
23300    }
23301}
23302#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23303#[doc = ""]
23304#[doc = "ID: 321"]
23305#[derive(Debug, Clone, PartialEq)]
23306#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23308#[cfg_attr(feature = "ts", derive(TS))]
23309#[cfg_attr(feature = "ts", ts(export))]
23310pub struct PARAM_EXT_REQUEST_LIST_DATA {
23311    #[doc = "System ID"]
23312    pub target_system: u8,
23313    #[doc = "Component ID"]
23314    pub target_component: u8,
23315}
23316impl PARAM_EXT_REQUEST_LIST_DATA {
23317    pub const ENCODED_LEN: usize = 2usize;
23318    pub const DEFAULT: Self = Self {
23319        target_system: 0_u8,
23320        target_component: 0_u8,
23321    };
23322    #[cfg(feature = "arbitrary")]
23323    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23324        use arbitrary::{Arbitrary, Unstructured};
23325        let mut buf = [0u8; 1024];
23326        rng.fill_bytes(&mut buf);
23327        let mut unstructured = Unstructured::new(&buf);
23328        Self::arbitrary(&mut unstructured).unwrap_or_default()
23329    }
23330}
23331impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23332    fn default() -> Self {
23333        Self::DEFAULT.clone()
23334    }
23335}
23336impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23337    type Message = MavMessage;
23338    const ID: u32 = 321u32;
23339    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23340    const EXTRA_CRC: u8 = 88u8;
23341    const ENCODED_LEN: usize = 2usize;
23342    fn deser(
23343        _version: MavlinkVersion,
23344        __input: &[u8],
23345    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23346        let avail_len = __input.len();
23347        let mut payload_buf = [0; Self::ENCODED_LEN];
23348        let mut buf = if avail_len < Self::ENCODED_LEN {
23349            payload_buf[0..avail_len].copy_from_slice(__input);
23350            Bytes::new(&payload_buf)
23351        } else {
23352            Bytes::new(__input)
23353        };
23354        let mut __struct = Self::default();
23355        __struct.target_system = buf.get_u8();
23356        __struct.target_component = buf.get_u8();
23357        Ok(__struct)
23358    }
23359    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23360        let mut __tmp = BytesMut::new(bytes);
23361        #[allow(clippy::absurd_extreme_comparisons)]
23362        #[allow(unused_comparisons)]
23363        if __tmp.remaining() < Self::ENCODED_LEN {
23364            panic!(
23365                "buffer is too small (need {} bytes, but got {})",
23366                Self::ENCODED_LEN,
23367                __tmp.remaining(),
23368            )
23369        }
23370        __tmp.put_u8(self.target_system);
23371        __tmp.put_u8(self.target_component);
23372        if matches!(version, MavlinkVersion::V2) {
23373            let len = __tmp.len();
23374            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23375        } else {
23376            __tmp.len()
23377        }
23378    }
23379}
23380#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23381#[doc = ""]
23382#[doc = "ID: 320"]
23383#[derive(Debug, Clone, PartialEq)]
23384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23385#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23386#[cfg_attr(feature = "ts", derive(TS))]
23387#[cfg_attr(feature = "ts", ts(export))]
23388pub struct PARAM_EXT_REQUEST_READ_DATA {
23389    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23390    pub param_index: i16,
23391    #[doc = "System ID"]
23392    pub target_system: u8,
23393    #[doc = "Component ID"]
23394    pub target_component: u8,
23395    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23396    #[cfg_attr(feature = "ts", ts(type = "string"))]
23397    pub param_id: CharArray<16>,
23398}
23399impl PARAM_EXT_REQUEST_READ_DATA {
23400    pub const ENCODED_LEN: usize = 20usize;
23401    pub const DEFAULT: Self = Self {
23402        param_index: 0_i16,
23403        target_system: 0_u8,
23404        target_component: 0_u8,
23405        param_id: CharArray::new([0_u8; 16usize]),
23406    };
23407    #[cfg(feature = "arbitrary")]
23408    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23409        use arbitrary::{Arbitrary, Unstructured};
23410        let mut buf = [0u8; 1024];
23411        rng.fill_bytes(&mut buf);
23412        let mut unstructured = Unstructured::new(&buf);
23413        Self::arbitrary(&mut unstructured).unwrap_or_default()
23414    }
23415}
23416impl Default for PARAM_EXT_REQUEST_READ_DATA {
23417    fn default() -> Self {
23418        Self::DEFAULT.clone()
23419    }
23420}
23421impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23422    type Message = MavMessage;
23423    const ID: u32 = 320u32;
23424    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23425    const EXTRA_CRC: u8 = 243u8;
23426    const ENCODED_LEN: usize = 20usize;
23427    fn deser(
23428        _version: MavlinkVersion,
23429        __input: &[u8],
23430    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23431        let avail_len = __input.len();
23432        let mut payload_buf = [0; Self::ENCODED_LEN];
23433        let mut buf = if avail_len < Self::ENCODED_LEN {
23434            payload_buf[0..avail_len].copy_from_slice(__input);
23435            Bytes::new(&payload_buf)
23436        } else {
23437            Bytes::new(__input)
23438        };
23439        let mut __struct = Self::default();
23440        __struct.param_index = buf.get_i16_le();
23441        __struct.target_system = buf.get_u8();
23442        __struct.target_component = buf.get_u8();
23443        let mut tmp = [0_u8; 16usize];
23444        for v in &mut tmp {
23445            *v = buf.get_u8();
23446        }
23447        __struct.param_id = CharArray::new(tmp);
23448        Ok(__struct)
23449    }
23450    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23451        let mut __tmp = BytesMut::new(bytes);
23452        #[allow(clippy::absurd_extreme_comparisons)]
23453        #[allow(unused_comparisons)]
23454        if __tmp.remaining() < Self::ENCODED_LEN {
23455            panic!(
23456                "buffer is too small (need {} bytes, but got {})",
23457                Self::ENCODED_LEN,
23458                __tmp.remaining(),
23459            )
23460        }
23461        __tmp.put_i16_le(self.param_index);
23462        __tmp.put_u8(self.target_system);
23463        __tmp.put_u8(self.target_component);
23464        for val in &self.param_id {
23465            __tmp.put_u8(*val);
23466        }
23467        if matches!(version, MavlinkVersion::V2) {
23468            let len = __tmp.len();
23469            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23470        } else {
23471            __tmp.len()
23472        }
23473    }
23474}
23475#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23476#[doc = ""]
23477#[doc = "ID: 323"]
23478#[derive(Debug, Clone, PartialEq)]
23479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23481#[cfg_attr(feature = "ts", derive(TS))]
23482#[cfg_attr(feature = "ts", ts(export))]
23483pub struct PARAM_EXT_SET_DATA {
23484    #[doc = "System ID"]
23485    pub target_system: u8,
23486    #[doc = "Component ID"]
23487    pub target_component: u8,
23488    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23489    #[cfg_attr(feature = "ts", ts(type = "string"))]
23490    pub param_id: CharArray<16>,
23491    #[doc = "Parameter value"]
23492    #[cfg_attr(feature = "ts", ts(type = "string"))]
23493    pub param_value: CharArray<128>,
23494    #[doc = "Parameter type."]
23495    pub param_type: MavParamExtType,
23496}
23497impl PARAM_EXT_SET_DATA {
23498    pub const ENCODED_LEN: usize = 147usize;
23499    pub const DEFAULT: Self = Self {
23500        target_system: 0_u8,
23501        target_component: 0_u8,
23502        param_id: CharArray::new([0_u8; 16usize]),
23503        param_value: CharArray::new([0_u8; 128usize]),
23504        param_type: MavParamExtType::DEFAULT,
23505    };
23506    #[cfg(feature = "arbitrary")]
23507    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23508        use arbitrary::{Arbitrary, Unstructured};
23509        let mut buf = [0u8; 1024];
23510        rng.fill_bytes(&mut buf);
23511        let mut unstructured = Unstructured::new(&buf);
23512        Self::arbitrary(&mut unstructured).unwrap_or_default()
23513    }
23514}
23515impl Default for PARAM_EXT_SET_DATA {
23516    fn default() -> Self {
23517        Self::DEFAULT.clone()
23518    }
23519}
23520impl MessageData for PARAM_EXT_SET_DATA {
23521    type Message = MavMessage;
23522    const ID: u32 = 323u32;
23523    const NAME: &'static str = "PARAM_EXT_SET";
23524    const EXTRA_CRC: u8 = 78u8;
23525    const ENCODED_LEN: usize = 147usize;
23526    fn deser(
23527        _version: MavlinkVersion,
23528        __input: &[u8],
23529    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23530        let avail_len = __input.len();
23531        let mut payload_buf = [0; Self::ENCODED_LEN];
23532        let mut buf = if avail_len < Self::ENCODED_LEN {
23533            payload_buf[0..avail_len].copy_from_slice(__input);
23534            Bytes::new(&payload_buf)
23535        } else {
23536            Bytes::new(__input)
23537        };
23538        let mut __struct = Self::default();
23539        __struct.target_system = buf.get_u8();
23540        __struct.target_component = buf.get_u8();
23541        let mut tmp = [0_u8; 16usize];
23542        for v in &mut tmp {
23543            *v = buf.get_u8();
23544        }
23545        __struct.param_id = CharArray::new(tmp);
23546        let mut tmp = [0_u8; 128usize];
23547        for v in &mut tmp {
23548            *v = buf.get_u8();
23549        }
23550        __struct.param_value = CharArray::new(tmp);
23551        let tmp = buf.get_u8();
23552        __struct.param_type =
23553            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23554                enum_type: "MavParamExtType",
23555                value: tmp as u64,
23556            })?;
23557        Ok(__struct)
23558    }
23559    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23560        let mut __tmp = BytesMut::new(bytes);
23561        #[allow(clippy::absurd_extreme_comparisons)]
23562        #[allow(unused_comparisons)]
23563        if __tmp.remaining() < Self::ENCODED_LEN {
23564            panic!(
23565                "buffer is too small (need {} bytes, but got {})",
23566                Self::ENCODED_LEN,
23567                __tmp.remaining(),
23568            )
23569        }
23570        __tmp.put_u8(self.target_system);
23571        __tmp.put_u8(self.target_component);
23572        for val in &self.param_id {
23573            __tmp.put_u8(*val);
23574        }
23575        for val in &self.param_value {
23576            __tmp.put_u8(*val);
23577        }
23578        __tmp.put_u8(self.param_type as u8);
23579        if matches!(version, MavlinkVersion::V2) {
23580            let len = __tmp.len();
23581            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23582        } else {
23583            __tmp.len()
23584        }
23585    }
23586}
23587#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23588#[doc = ""]
23589#[doc = "ID: 322"]
23590#[derive(Debug, Clone, PartialEq)]
23591#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23592#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23593#[cfg_attr(feature = "ts", derive(TS))]
23594#[cfg_attr(feature = "ts", ts(export))]
23595pub struct PARAM_EXT_VALUE_DATA {
23596    #[doc = "Total number of parameters"]
23597    pub param_count: u16,
23598    #[doc = "Index of this parameter"]
23599    pub param_index: u16,
23600    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23601    #[cfg_attr(feature = "ts", ts(type = "string"))]
23602    pub param_id: CharArray<16>,
23603    #[doc = "Parameter value"]
23604    #[cfg_attr(feature = "ts", ts(type = "string"))]
23605    pub param_value: CharArray<128>,
23606    #[doc = "Parameter type."]
23607    pub param_type: MavParamExtType,
23608}
23609impl PARAM_EXT_VALUE_DATA {
23610    pub const ENCODED_LEN: usize = 149usize;
23611    pub const DEFAULT: Self = Self {
23612        param_count: 0_u16,
23613        param_index: 0_u16,
23614        param_id: CharArray::new([0_u8; 16usize]),
23615        param_value: CharArray::new([0_u8; 128usize]),
23616        param_type: MavParamExtType::DEFAULT,
23617    };
23618    #[cfg(feature = "arbitrary")]
23619    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23620        use arbitrary::{Arbitrary, Unstructured};
23621        let mut buf = [0u8; 1024];
23622        rng.fill_bytes(&mut buf);
23623        let mut unstructured = Unstructured::new(&buf);
23624        Self::arbitrary(&mut unstructured).unwrap_or_default()
23625    }
23626}
23627impl Default for PARAM_EXT_VALUE_DATA {
23628    fn default() -> Self {
23629        Self::DEFAULT.clone()
23630    }
23631}
23632impl MessageData for PARAM_EXT_VALUE_DATA {
23633    type Message = MavMessage;
23634    const ID: u32 = 322u32;
23635    const NAME: &'static str = "PARAM_EXT_VALUE";
23636    const EXTRA_CRC: u8 = 243u8;
23637    const ENCODED_LEN: usize = 149usize;
23638    fn deser(
23639        _version: MavlinkVersion,
23640        __input: &[u8],
23641    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23642        let avail_len = __input.len();
23643        let mut payload_buf = [0; Self::ENCODED_LEN];
23644        let mut buf = if avail_len < Self::ENCODED_LEN {
23645            payload_buf[0..avail_len].copy_from_slice(__input);
23646            Bytes::new(&payload_buf)
23647        } else {
23648            Bytes::new(__input)
23649        };
23650        let mut __struct = Self::default();
23651        __struct.param_count = buf.get_u16_le();
23652        __struct.param_index = buf.get_u16_le();
23653        let mut tmp = [0_u8; 16usize];
23654        for v in &mut tmp {
23655            *v = buf.get_u8();
23656        }
23657        __struct.param_id = CharArray::new(tmp);
23658        let mut tmp = [0_u8; 128usize];
23659        for v in &mut tmp {
23660            *v = buf.get_u8();
23661        }
23662        __struct.param_value = CharArray::new(tmp);
23663        let tmp = buf.get_u8();
23664        __struct.param_type =
23665            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23666                enum_type: "MavParamExtType",
23667                value: tmp as u64,
23668            })?;
23669        Ok(__struct)
23670    }
23671    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23672        let mut __tmp = BytesMut::new(bytes);
23673        #[allow(clippy::absurd_extreme_comparisons)]
23674        #[allow(unused_comparisons)]
23675        if __tmp.remaining() < Self::ENCODED_LEN {
23676            panic!(
23677                "buffer is too small (need {} bytes, but got {})",
23678                Self::ENCODED_LEN,
23679                __tmp.remaining(),
23680            )
23681        }
23682        __tmp.put_u16_le(self.param_count);
23683        __tmp.put_u16_le(self.param_index);
23684        for val in &self.param_id {
23685            __tmp.put_u8(*val);
23686        }
23687        for val in &self.param_value {
23688            __tmp.put_u8(*val);
23689        }
23690        __tmp.put_u8(self.param_type as u8);
23691        if matches!(version, MavlinkVersion::V2) {
23692            let len = __tmp.len();
23693            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23694        } else {
23695            __tmp.len()
23696        }
23697    }
23698}
23699#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23700#[doc = ""]
23701#[doc = "ID: 50"]
23702#[derive(Debug, Clone, PartialEq)]
23703#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23704#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23705#[cfg_attr(feature = "ts", derive(TS))]
23706#[cfg_attr(feature = "ts", ts(export))]
23707pub struct PARAM_MAP_RC_DATA {
23708    #[doc = "Initial parameter value"]
23709    pub param_value0: f32,
23710    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23711    pub scale: f32,
23712    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23713    pub param_value_min: f32,
23714    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23715    pub param_value_max: f32,
23716    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23717    pub param_index: i16,
23718    #[doc = "System ID"]
23719    pub target_system: u8,
23720    #[doc = "Component ID"]
23721    pub target_component: u8,
23722    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23723    #[cfg_attr(feature = "ts", ts(type = "string"))]
23724    pub param_id: CharArray<16>,
23725    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23726    pub parameter_rc_channel_index: u8,
23727}
23728impl PARAM_MAP_RC_DATA {
23729    pub const ENCODED_LEN: usize = 37usize;
23730    pub const DEFAULT: Self = Self {
23731        param_value0: 0.0_f32,
23732        scale: 0.0_f32,
23733        param_value_min: 0.0_f32,
23734        param_value_max: 0.0_f32,
23735        param_index: 0_i16,
23736        target_system: 0_u8,
23737        target_component: 0_u8,
23738        param_id: CharArray::new([0_u8; 16usize]),
23739        parameter_rc_channel_index: 0_u8,
23740    };
23741    #[cfg(feature = "arbitrary")]
23742    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23743        use arbitrary::{Arbitrary, Unstructured};
23744        let mut buf = [0u8; 1024];
23745        rng.fill_bytes(&mut buf);
23746        let mut unstructured = Unstructured::new(&buf);
23747        Self::arbitrary(&mut unstructured).unwrap_or_default()
23748    }
23749}
23750impl Default for PARAM_MAP_RC_DATA {
23751    fn default() -> Self {
23752        Self::DEFAULT.clone()
23753    }
23754}
23755impl MessageData for PARAM_MAP_RC_DATA {
23756    type Message = MavMessage;
23757    const ID: u32 = 50u32;
23758    const NAME: &'static str = "PARAM_MAP_RC";
23759    const EXTRA_CRC: u8 = 78u8;
23760    const ENCODED_LEN: usize = 37usize;
23761    fn deser(
23762        _version: MavlinkVersion,
23763        __input: &[u8],
23764    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23765        let avail_len = __input.len();
23766        let mut payload_buf = [0; Self::ENCODED_LEN];
23767        let mut buf = if avail_len < Self::ENCODED_LEN {
23768            payload_buf[0..avail_len].copy_from_slice(__input);
23769            Bytes::new(&payload_buf)
23770        } else {
23771            Bytes::new(__input)
23772        };
23773        let mut __struct = Self::default();
23774        __struct.param_value0 = buf.get_f32_le();
23775        __struct.scale = buf.get_f32_le();
23776        __struct.param_value_min = buf.get_f32_le();
23777        __struct.param_value_max = buf.get_f32_le();
23778        __struct.param_index = buf.get_i16_le();
23779        __struct.target_system = buf.get_u8();
23780        __struct.target_component = buf.get_u8();
23781        let mut tmp = [0_u8; 16usize];
23782        for v in &mut tmp {
23783            *v = buf.get_u8();
23784        }
23785        __struct.param_id = CharArray::new(tmp);
23786        __struct.parameter_rc_channel_index = buf.get_u8();
23787        Ok(__struct)
23788    }
23789    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23790        let mut __tmp = BytesMut::new(bytes);
23791        #[allow(clippy::absurd_extreme_comparisons)]
23792        #[allow(unused_comparisons)]
23793        if __tmp.remaining() < Self::ENCODED_LEN {
23794            panic!(
23795                "buffer is too small (need {} bytes, but got {})",
23796                Self::ENCODED_LEN,
23797                __tmp.remaining(),
23798            )
23799        }
23800        __tmp.put_f32_le(self.param_value0);
23801        __tmp.put_f32_le(self.scale);
23802        __tmp.put_f32_le(self.param_value_min);
23803        __tmp.put_f32_le(self.param_value_max);
23804        __tmp.put_i16_le(self.param_index);
23805        __tmp.put_u8(self.target_system);
23806        __tmp.put_u8(self.target_component);
23807        for val in &self.param_id {
23808            __tmp.put_u8(*val);
23809        }
23810        __tmp.put_u8(self.parameter_rc_channel_index);
23811        if matches!(version, MavlinkVersion::V2) {
23812            let len = __tmp.len();
23813            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23814        } else {
23815            __tmp.len()
23816        }
23817    }
23818}
23819#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23820#[doc = ""]
23821#[doc = "ID: 21"]
23822#[derive(Debug, Clone, PartialEq)]
23823#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23825#[cfg_attr(feature = "ts", derive(TS))]
23826#[cfg_attr(feature = "ts", ts(export))]
23827pub struct PARAM_REQUEST_LIST_DATA {
23828    #[doc = "System ID"]
23829    pub target_system: u8,
23830    #[doc = "Component ID"]
23831    pub target_component: u8,
23832}
23833impl PARAM_REQUEST_LIST_DATA {
23834    pub const ENCODED_LEN: usize = 2usize;
23835    pub const DEFAULT: Self = Self {
23836        target_system: 0_u8,
23837        target_component: 0_u8,
23838    };
23839    #[cfg(feature = "arbitrary")]
23840    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23841        use arbitrary::{Arbitrary, Unstructured};
23842        let mut buf = [0u8; 1024];
23843        rng.fill_bytes(&mut buf);
23844        let mut unstructured = Unstructured::new(&buf);
23845        Self::arbitrary(&mut unstructured).unwrap_or_default()
23846    }
23847}
23848impl Default for PARAM_REQUEST_LIST_DATA {
23849    fn default() -> Self {
23850        Self::DEFAULT.clone()
23851    }
23852}
23853impl MessageData for PARAM_REQUEST_LIST_DATA {
23854    type Message = MavMessage;
23855    const ID: u32 = 21u32;
23856    const NAME: &'static str = "PARAM_REQUEST_LIST";
23857    const EXTRA_CRC: u8 = 159u8;
23858    const ENCODED_LEN: usize = 2usize;
23859    fn deser(
23860        _version: MavlinkVersion,
23861        __input: &[u8],
23862    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23863        let avail_len = __input.len();
23864        let mut payload_buf = [0; Self::ENCODED_LEN];
23865        let mut buf = if avail_len < Self::ENCODED_LEN {
23866            payload_buf[0..avail_len].copy_from_slice(__input);
23867            Bytes::new(&payload_buf)
23868        } else {
23869            Bytes::new(__input)
23870        };
23871        let mut __struct = Self::default();
23872        __struct.target_system = buf.get_u8();
23873        __struct.target_component = buf.get_u8();
23874        Ok(__struct)
23875    }
23876    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23877        let mut __tmp = BytesMut::new(bytes);
23878        #[allow(clippy::absurd_extreme_comparisons)]
23879        #[allow(unused_comparisons)]
23880        if __tmp.remaining() < Self::ENCODED_LEN {
23881            panic!(
23882                "buffer is too small (need {} bytes, but got {})",
23883                Self::ENCODED_LEN,
23884                __tmp.remaining(),
23885            )
23886        }
23887        __tmp.put_u8(self.target_system);
23888        __tmp.put_u8(self.target_component);
23889        if matches!(version, MavlinkVersion::V2) {
23890            let len = __tmp.len();
23891            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23892        } else {
23893            __tmp.len()
23894        }
23895    }
23896}
23897#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
23898#[doc = ""]
23899#[doc = "ID: 20"]
23900#[derive(Debug, Clone, PartialEq)]
23901#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23902#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23903#[cfg_attr(feature = "ts", derive(TS))]
23904#[cfg_attr(feature = "ts", ts(export))]
23905pub struct PARAM_REQUEST_READ_DATA {
23906    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
23907    pub param_index: i16,
23908    #[doc = "System ID"]
23909    pub target_system: u8,
23910    #[doc = "Component ID"]
23911    pub target_component: u8,
23912    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23913    #[cfg_attr(feature = "ts", ts(type = "string"))]
23914    pub param_id: CharArray<16>,
23915}
23916impl PARAM_REQUEST_READ_DATA {
23917    pub const ENCODED_LEN: usize = 20usize;
23918    pub const DEFAULT: Self = Self {
23919        param_index: 0_i16,
23920        target_system: 0_u8,
23921        target_component: 0_u8,
23922        param_id: CharArray::new([0_u8; 16usize]),
23923    };
23924    #[cfg(feature = "arbitrary")]
23925    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23926        use arbitrary::{Arbitrary, Unstructured};
23927        let mut buf = [0u8; 1024];
23928        rng.fill_bytes(&mut buf);
23929        let mut unstructured = Unstructured::new(&buf);
23930        Self::arbitrary(&mut unstructured).unwrap_or_default()
23931    }
23932}
23933impl Default for PARAM_REQUEST_READ_DATA {
23934    fn default() -> Self {
23935        Self::DEFAULT.clone()
23936    }
23937}
23938impl MessageData for PARAM_REQUEST_READ_DATA {
23939    type Message = MavMessage;
23940    const ID: u32 = 20u32;
23941    const NAME: &'static str = "PARAM_REQUEST_READ";
23942    const EXTRA_CRC: u8 = 214u8;
23943    const ENCODED_LEN: usize = 20usize;
23944    fn deser(
23945        _version: MavlinkVersion,
23946        __input: &[u8],
23947    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23948        let avail_len = __input.len();
23949        let mut payload_buf = [0; Self::ENCODED_LEN];
23950        let mut buf = if avail_len < Self::ENCODED_LEN {
23951            payload_buf[0..avail_len].copy_from_slice(__input);
23952            Bytes::new(&payload_buf)
23953        } else {
23954            Bytes::new(__input)
23955        };
23956        let mut __struct = Self::default();
23957        __struct.param_index = buf.get_i16_le();
23958        __struct.target_system = buf.get_u8();
23959        __struct.target_component = buf.get_u8();
23960        let mut tmp = [0_u8; 16usize];
23961        for v in &mut tmp {
23962            *v = buf.get_u8();
23963        }
23964        __struct.param_id = CharArray::new(tmp);
23965        Ok(__struct)
23966    }
23967    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23968        let mut __tmp = BytesMut::new(bytes);
23969        #[allow(clippy::absurd_extreme_comparisons)]
23970        #[allow(unused_comparisons)]
23971        if __tmp.remaining() < Self::ENCODED_LEN {
23972            panic!(
23973                "buffer is too small (need {} bytes, but got {})",
23974                Self::ENCODED_LEN,
23975                __tmp.remaining(),
23976            )
23977        }
23978        __tmp.put_i16_le(self.param_index);
23979        __tmp.put_u8(self.target_system);
23980        __tmp.put_u8(self.target_component);
23981        for val in &self.param_id {
23982            __tmp.put_u8(*val);
23983        }
23984        if matches!(version, MavlinkVersion::V2) {
23985            let len = __tmp.len();
23986            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23987        } else {
23988            __tmp.len()
23989        }
23990    }
23991}
23992#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23993#[doc = ""]
23994#[doc = "ID: 23"]
23995#[derive(Debug, Clone, PartialEq)]
23996#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23998#[cfg_attr(feature = "ts", derive(TS))]
23999#[cfg_attr(feature = "ts", ts(export))]
24000pub struct PARAM_SET_DATA {
24001    #[doc = "Onboard parameter value"]
24002    pub param_value: f32,
24003    #[doc = "System ID"]
24004    pub target_system: u8,
24005    #[doc = "Component ID"]
24006    pub target_component: u8,
24007    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24008    #[cfg_attr(feature = "ts", ts(type = "string"))]
24009    pub param_id: CharArray<16>,
24010    #[doc = "Onboard parameter type."]
24011    pub param_type: MavParamType,
24012}
24013impl PARAM_SET_DATA {
24014    pub const ENCODED_LEN: usize = 23usize;
24015    pub const DEFAULT: Self = Self {
24016        param_value: 0.0_f32,
24017        target_system: 0_u8,
24018        target_component: 0_u8,
24019        param_id: CharArray::new([0_u8; 16usize]),
24020        param_type: MavParamType::DEFAULT,
24021    };
24022    #[cfg(feature = "arbitrary")]
24023    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24024        use arbitrary::{Arbitrary, Unstructured};
24025        let mut buf = [0u8; 1024];
24026        rng.fill_bytes(&mut buf);
24027        let mut unstructured = Unstructured::new(&buf);
24028        Self::arbitrary(&mut unstructured).unwrap_or_default()
24029    }
24030}
24031impl Default for PARAM_SET_DATA {
24032    fn default() -> Self {
24033        Self::DEFAULT.clone()
24034    }
24035}
24036impl MessageData for PARAM_SET_DATA {
24037    type Message = MavMessage;
24038    const ID: u32 = 23u32;
24039    const NAME: &'static str = "PARAM_SET";
24040    const EXTRA_CRC: u8 = 168u8;
24041    const ENCODED_LEN: usize = 23usize;
24042    fn deser(
24043        _version: MavlinkVersion,
24044        __input: &[u8],
24045    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24046        let avail_len = __input.len();
24047        let mut payload_buf = [0; Self::ENCODED_LEN];
24048        let mut buf = if avail_len < Self::ENCODED_LEN {
24049            payload_buf[0..avail_len].copy_from_slice(__input);
24050            Bytes::new(&payload_buf)
24051        } else {
24052            Bytes::new(__input)
24053        };
24054        let mut __struct = Self::default();
24055        __struct.param_value = buf.get_f32_le();
24056        __struct.target_system = buf.get_u8();
24057        __struct.target_component = buf.get_u8();
24058        let mut tmp = [0_u8; 16usize];
24059        for v in &mut tmp {
24060            *v = buf.get_u8();
24061        }
24062        __struct.param_id = CharArray::new(tmp);
24063        let tmp = buf.get_u8();
24064        __struct.param_type =
24065            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24066                enum_type: "MavParamType",
24067                value: tmp as u64,
24068            })?;
24069        Ok(__struct)
24070    }
24071    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24072        let mut __tmp = BytesMut::new(bytes);
24073        #[allow(clippy::absurd_extreme_comparisons)]
24074        #[allow(unused_comparisons)]
24075        if __tmp.remaining() < Self::ENCODED_LEN {
24076            panic!(
24077                "buffer is too small (need {} bytes, but got {})",
24078                Self::ENCODED_LEN,
24079                __tmp.remaining(),
24080            )
24081        }
24082        __tmp.put_f32_le(self.param_value);
24083        __tmp.put_u8(self.target_system);
24084        __tmp.put_u8(self.target_component);
24085        for val in &self.param_id {
24086            __tmp.put_u8(*val);
24087        }
24088        __tmp.put_u8(self.param_type as u8);
24089        if matches!(version, MavlinkVersion::V2) {
24090            let len = __tmp.len();
24091            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24092        } else {
24093            __tmp.len()
24094        }
24095    }
24096}
24097#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24098#[doc = ""]
24099#[doc = "ID: 22"]
24100#[derive(Debug, Clone, PartialEq)]
24101#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24102#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24103#[cfg_attr(feature = "ts", derive(TS))]
24104#[cfg_attr(feature = "ts", ts(export))]
24105pub struct PARAM_VALUE_DATA {
24106    #[doc = "Onboard parameter value"]
24107    pub param_value: f32,
24108    #[doc = "Total number of onboard parameters"]
24109    pub param_count: u16,
24110    #[doc = "Index of this onboard parameter"]
24111    pub param_index: u16,
24112    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24113    #[cfg_attr(feature = "ts", ts(type = "string"))]
24114    pub param_id: CharArray<16>,
24115    #[doc = "Onboard parameter type."]
24116    pub param_type: MavParamType,
24117}
24118impl PARAM_VALUE_DATA {
24119    pub const ENCODED_LEN: usize = 25usize;
24120    pub const DEFAULT: Self = Self {
24121        param_value: 0.0_f32,
24122        param_count: 0_u16,
24123        param_index: 0_u16,
24124        param_id: CharArray::new([0_u8; 16usize]),
24125        param_type: MavParamType::DEFAULT,
24126    };
24127    #[cfg(feature = "arbitrary")]
24128    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24129        use arbitrary::{Arbitrary, Unstructured};
24130        let mut buf = [0u8; 1024];
24131        rng.fill_bytes(&mut buf);
24132        let mut unstructured = Unstructured::new(&buf);
24133        Self::arbitrary(&mut unstructured).unwrap_or_default()
24134    }
24135}
24136impl Default for PARAM_VALUE_DATA {
24137    fn default() -> Self {
24138        Self::DEFAULT.clone()
24139    }
24140}
24141impl MessageData for PARAM_VALUE_DATA {
24142    type Message = MavMessage;
24143    const ID: u32 = 22u32;
24144    const NAME: &'static str = "PARAM_VALUE";
24145    const EXTRA_CRC: u8 = 220u8;
24146    const ENCODED_LEN: usize = 25usize;
24147    fn deser(
24148        _version: MavlinkVersion,
24149        __input: &[u8],
24150    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24151        let avail_len = __input.len();
24152        let mut payload_buf = [0; Self::ENCODED_LEN];
24153        let mut buf = if avail_len < Self::ENCODED_LEN {
24154            payload_buf[0..avail_len].copy_from_slice(__input);
24155            Bytes::new(&payload_buf)
24156        } else {
24157            Bytes::new(__input)
24158        };
24159        let mut __struct = Self::default();
24160        __struct.param_value = buf.get_f32_le();
24161        __struct.param_count = buf.get_u16_le();
24162        __struct.param_index = buf.get_u16_le();
24163        let mut tmp = [0_u8; 16usize];
24164        for v in &mut tmp {
24165            *v = buf.get_u8();
24166        }
24167        __struct.param_id = CharArray::new(tmp);
24168        let tmp = buf.get_u8();
24169        __struct.param_type =
24170            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24171                enum_type: "MavParamType",
24172                value: tmp as u64,
24173            })?;
24174        Ok(__struct)
24175    }
24176    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24177        let mut __tmp = BytesMut::new(bytes);
24178        #[allow(clippy::absurd_extreme_comparisons)]
24179        #[allow(unused_comparisons)]
24180        if __tmp.remaining() < Self::ENCODED_LEN {
24181            panic!(
24182                "buffer is too small (need {} bytes, but got {})",
24183                Self::ENCODED_LEN,
24184                __tmp.remaining(),
24185            )
24186        }
24187        __tmp.put_f32_le(self.param_value);
24188        __tmp.put_u16_le(self.param_count);
24189        __tmp.put_u16_le(self.param_index);
24190        for val in &self.param_id {
24191            __tmp.put_u8(*val);
24192        }
24193        __tmp.put_u8(self.param_type as u8);
24194        if matches!(version, MavlinkVersion::V2) {
24195            let len = __tmp.len();
24196            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24197        } else {
24198            __tmp.len()
24199        }
24200    }
24201}
24202#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24203#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24204#[doc = ""]
24205#[doc = "ID: 4"]
24206#[derive(Debug, Clone, PartialEq)]
24207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24209#[cfg_attr(feature = "ts", derive(TS))]
24210#[cfg_attr(feature = "ts", ts(export))]
24211pub struct PING_DATA {
24212    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24213    pub time_usec: u64,
24214    #[doc = "PING sequence"]
24215    pub seq: u32,
24216    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24217    pub target_system: u8,
24218    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24219    pub target_component: u8,
24220}
24221impl PING_DATA {
24222    pub const ENCODED_LEN: usize = 14usize;
24223    pub const DEFAULT: Self = Self {
24224        time_usec: 0_u64,
24225        seq: 0_u32,
24226        target_system: 0_u8,
24227        target_component: 0_u8,
24228    };
24229    #[cfg(feature = "arbitrary")]
24230    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24231        use arbitrary::{Arbitrary, Unstructured};
24232        let mut buf = [0u8; 1024];
24233        rng.fill_bytes(&mut buf);
24234        let mut unstructured = Unstructured::new(&buf);
24235        Self::arbitrary(&mut unstructured).unwrap_or_default()
24236    }
24237}
24238impl Default for PING_DATA {
24239    fn default() -> Self {
24240        Self::DEFAULT.clone()
24241    }
24242}
24243impl MessageData for PING_DATA {
24244    type Message = MavMessage;
24245    const ID: u32 = 4u32;
24246    const NAME: &'static str = "PING";
24247    const EXTRA_CRC: u8 = 237u8;
24248    const ENCODED_LEN: usize = 14usize;
24249    fn deser(
24250        _version: MavlinkVersion,
24251        __input: &[u8],
24252    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24253        let avail_len = __input.len();
24254        let mut payload_buf = [0; Self::ENCODED_LEN];
24255        let mut buf = if avail_len < Self::ENCODED_LEN {
24256            payload_buf[0..avail_len].copy_from_slice(__input);
24257            Bytes::new(&payload_buf)
24258        } else {
24259            Bytes::new(__input)
24260        };
24261        let mut __struct = Self::default();
24262        __struct.time_usec = buf.get_u64_le();
24263        __struct.seq = buf.get_u32_le();
24264        __struct.target_system = buf.get_u8();
24265        __struct.target_component = buf.get_u8();
24266        Ok(__struct)
24267    }
24268    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24269        let mut __tmp = BytesMut::new(bytes);
24270        #[allow(clippy::absurd_extreme_comparisons)]
24271        #[allow(unused_comparisons)]
24272        if __tmp.remaining() < Self::ENCODED_LEN {
24273            panic!(
24274                "buffer is too small (need {} bytes, but got {})",
24275                Self::ENCODED_LEN,
24276                __tmp.remaining(),
24277            )
24278        }
24279        __tmp.put_u64_le(self.time_usec);
24280        __tmp.put_u32_le(self.seq);
24281        __tmp.put_u8(self.target_system);
24282        __tmp.put_u8(self.target_component);
24283        if matches!(version, MavlinkVersion::V2) {
24284            let len = __tmp.len();
24285            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24286        } else {
24287            __tmp.len()
24288        }
24289    }
24290}
24291#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24292#[doc = "Control vehicle tone generation (buzzer)."]
24293#[doc = ""]
24294#[doc = "ID: 258"]
24295#[derive(Debug, Clone, PartialEq)]
24296#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24297#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24298#[cfg_attr(feature = "ts", derive(TS))]
24299#[cfg_attr(feature = "ts", ts(export))]
24300pub struct PLAY_TUNE_DATA {
24301    #[doc = "System ID"]
24302    pub target_system: u8,
24303    #[doc = "Component ID"]
24304    pub target_component: u8,
24305    #[doc = "tune in board specific format"]
24306    #[cfg_attr(feature = "ts", ts(type = "string"))]
24307    pub tune: CharArray<30>,
24308    #[doc = "tune extension (appended to tune)"]
24309    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24310    #[cfg_attr(feature = "ts", ts(type = "string"))]
24311    pub tune2: CharArray<200>,
24312}
24313impl PLAY_TUNE_DATA {
24314    pub const ENCODED_LEN: usize = 232usize;
24315    pub const DEFAULT: Self = Self {
24316        target_system: 0_u8,
24317        target_component: 0_u8,
24318        tune: CharArray::new([0_u8; 30usize]),
24319        tune2: CharArray::new([0_u8; 200usize]),
24320    };
24321    #[cfg(feature = "arbitrary")]
24322    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24323        use arbitrary::{Arbitrary, Unstructured};
24324        let mut buf = [0u8; 1024];
24325        rng.fill_bytes(&mut buf);
24326        let mut unstructured = Unstructured::new(&buf);
24327        Self::arbitrary(&mut unstructured).unwrap_or_default()
24328    }
24329}
24330impl Default for PLAY_TUNE_DATA {
24331    fn default() -> Self {
24332        Self::DEFAULT.clone()
24333    }
24334}
24335impl MessageData for PLAY_TUNE_DATA {
24336    type Message = MavMessage;
24337    const ID: u32 = 258u32;
24338    const NAME: &'static str = "PLAY_TUNE";
24339    const EXTRA_CRC: u8 = 187u8;
24340    const ENCODED_LEN: usize = 232usize;
24341    fn deser(
24342        _version: MavlinkVersion,
24343        __input: &[u8],
24344    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24345        let avail_len = __input.len();
24346        let mut payload_buf = [0; Self::ENCODED_LEN];
24347        let mut buf = if avail_len < Self::ENCODED_LEN {
24348            payload_buf[0..avail_len].copy_from_slice(__input);
24349            Bytes::new(&payload_buf)
24350        } else {
24351            Bytes::new(__input)
24352        };
24353        let mut __struct = Self::default();
24354        __struct.target_system = buf.get_u8();
24355        __struct.target_component = buf.get_u8();
24356        let mut tmp = [0_u8; 30usize];
24357        for v in &mut tmp {
24358            *v = buf.get_u8();
24359        }
24360        __struct.tune = CharArray::new(tmp);
24361        let mut tmp = [0_u8; 200usize];
24362        for v in &mut tmp {
24363            *v = buf.get_u8();
24364        }
24365        __struct.tune2 = CharArray::new(tmp);
24366        Ok(__struct)
24367    }
24368    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24369        let mut __tmp = BytesMut::new(bytes);
24370        #[allow(clippy::absurd_extreme_comparisons)]
24371        #[allow(unused_comparisons)]
24372        if __tmp.remaining() < Self::ENCODED_LEN {
24373            panic!(
24374                "buffer is too small (need {} bytes, but got {})",
24375                Self::ENCODED_LEN,
24376                __tmp.remaining(),
24377            )
24378        }
24379        __tmp.put_u8(self.target_system);
24380        __tmp.put_u8(self.target_component);
24381        for val in &self.tune {
24382            __tmp.put_u8(*val);
24383        }
24384        if matches!(version, MavlinkVersion::V2) {
24385            for val in &self.tune2 {
24386                __tmp.put_u8(*val);
24387            }
24388            let len = __tmp.len();
24389            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24390        } else {
24391            __tmp.len()
24392        }
24393    }
24394}
24395#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24396#[doc = ""]
24397#[doc = "ID: 400"]
24398#[derive(Debug, Clone, PartialEq)]
24399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24400#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24401#[cfg_attr(feature = "ts", derive(TS))]
24402#[cfg_attr(feature = "ts", ts(export))]
24403pub struct PLAY_TUNE_V2_DATA {
24404    #[doc = "Tune format"]
24405    pub format: TuneFormat,
24406    #[doc = "System ID"]
24407    pub target_system: u8,
24408    #[doc = "Component ID"]
24409    pub target_component: u8,
24410    #[doc = "Tune definition as a NULL-terminated string."]
24411    #[cfg_attr(feature = "ts", ts(type = "string"))]
24412    pub tune: CharArray<248>,
24413}
24414impl PLAY_TUNE_V2_DATA {
24415    pub const ENCODED_LEN: usize = 254usize;
24416    pub const DEFAULT: Self = Self {
24417        format: TuneFormat::DEFAULT,
24418        target_system: 0_u8,
24419        target_component: 0_u8,
24420        tune: CharArray::new([0_u8; 248usize]),
24421    };
24422    #[cfg(feature = "arbitrary")]
24423    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24424        use arbitrary::{Arbitrary, Unstructured};
24425        let mut buf = [0u8; 1024];
24426        rng.fill_bytes(&mut buf);
24427        let mut unstructured = Unstructured::new(&buf);
24428        Self::arbitrary(&mut unstructured).unwrap_or_default()
24429    }
24430}
24431impl Default for PLAY_TUNE_V2_DATA {
24432    fn default() -> Self {
24433        Self::DEFAULT.clone()
24434    }
24435}
24436impl MessageData for PLAY_TUNE_V2_DATA {
24437    type Message = MavMessage;
24438    const ID: u32 = 400u32;
24439    const NAME: &'static str = "PLAY_TUNE_V2";
24440    const EXTRA_CRC: u8 = 110u8;
24441    const ENCODED_LEN: usize = 254usize;
24442    fn deser(
24443        _version: MavlinkVersion,
24444        __input: &[u8],
24445    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24446        let avail_len = __input.len();
24447        let mut payload_buf = [0; Self::ENCODED_LEN];
24448        let mut buf = if avail_len < Self::ENCODED_LEN {
24449            payload_buf[0..avail_len].copy_from_slice(__input);
24450            Bytes::new(&payload_buf)
24451        } else {
24452            Bytes::new(__input)
24453        };
24454        let mut __struct = Self::default();
24455        let tmp = buf.get_u32_le();
24456        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24457            ::mavlink_core::error::ParserError::InvalidEnum {
24458                enum_type: "TuneFormat",
24459                value: tmp as u64,
24460            },
24461        )?;
24462        __struct.target_system = buf.get_u8();
24463        __struct.target_component = buf.get_u8();
24464        let mut tmp = [0_u8; 248usize];
24465        for v in &mut tmp {
24466            *v = buf.get_u8();
24467        }
24468        __struct.tune = CharArray::new(tmp);
24469        Ok(__struct)
24470    }
24471    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24472        let mut __tmp = BytesMut::new(bytes);
24473        #[allow(clippy::absurd_extreme_comparisons)]
24474        #[allow(unused_comparisons)]
24475        if __tmp.remaining() < Self::ENCODED_LEN {
24476            panic!(
24477                "buffer is too small (need {} bytes, but got {})",
24478                Self::ENCODED_LEN,
24479                __tmp.remaining(),
24480            )
24481        }
24482        __tmp.put_u32_le(self.format as u32);
24483        __tmp.put_u8(self.target_system);
24484        __tmp.put_u8(self.target_component);
24485        for val in &self.tune {
24486            __tmp.put_u8(*val);
24487        }
24488        if matches!(version, MavlinkVersion::V2) {
24489            let len = __tmp.len();
24490            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24491        } else {
24492            __tmp.len()
24493        }
24494    }
24495}
24496#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24497#[doc = ""]
24498#[doc = "ID: 87"]
24499#[derive(Debug, Clone, PartialEq)]
24500#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24502#[cfg_attr(feature = "ts", derive(TS))]
24503#[cfg_attr(feature = "ts", ts(export))]
24504pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24505    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24506    pub time_boot_ms: u32,
24507    #[doc = "Latitude in WGS84 frame"]
24508    pub lat_int: i32,
24509    #[doc = "Longitude in WGS84 frame"]
24510    pub lon_int: i32,
24511    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24512    pub alt: f32,
24513    #[doc = "X velocity in NED frame"]
24514    pub vx: f32,
24515    #[doc = "Y velocity in NED frame"]
24516    pub vy: f32,
24517    #[doc = "Z velocity in NED frame"]
24518    pub vz: f32,
24519    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24520    pub afx: f32,
24521    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24522    pub afy: f32,
24523    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24524    pub afz: f32,
24525    #[doc = "yaw setpoint"]
24526    pub yaw: f32,
24527    #[doc = "yaw rate setpoint"]
24528    pub yaw_rate: f32,
24529    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24530    pub type_mask: PositionTargetTypemask,
24531    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24532    pub coordinate_frame: MavFrame,
24533}
24534impl POSITION_TARGET_GLOBAL_INT_DATA {
24535    pub const ENCODED_LEN: usize = 51usize;
24536    pub const DEFAULT: Self = Self {
24537        time_boot_ms: 0_u32,
24538        lat_int: 0_i32,
24539        lon_int: 0_i32,
24540        alt: 0.0_f32,
24541        vx: 0.0_f32,
24542        vy: 0.0_f32,
24543        vz: 0.0_f32,
24544        afx: 0.0_f32,
24545        afy: 0.0_f32,
24546        afz: 0.0_f32,
24547        yaw: 0.0_f32,
24548        yaw_rate: 0.0_f32,
24549        type_mask: PositionTargetTypemask::DEFAULT,
24550        coordinate_frame: MavFrame::DEFAULT,
24551    };
24552    #[cfg(feature = "arbitrary")]
24553    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24554        use arbitrary::{Arbitrary, Unstructured};
24555        let mut buf = [0u8; 1024];
24556        rng.fill_bytes(&mut buf);
24557        let mut unstructured = Unstructured::new(&buf);
24558        Self::arbitrary(&mut unstructured).unwrap_or_default()
24559    }
24560}
24561impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24562    fn default() -> Self {
24563        Self::DEFAULT.clone()
24564    }
24565}
24566impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24567    type Message = MavMessage;
24568    const ID: u32 = 87u32;
24569    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24570    const EXTRA_CRC: u8 = 150u8;
24571    const ENCODED_LEN: usize = 51usize;
24572    fn deser(
24573        _version: MavlinkVersion,
24574        __input: &[u8],
24575    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24576        let avail_len = __input.len();
24577        let mut payload_buf = [0; Self::ENCODED_LEN];
24578        let mut buf = if avail_len < Self::ENCODED_LEN {
24579            payload_buf[0..avail_len].copy_from_slice(__input);
24580            Bytes::new(&payload_buf)
24581        } else {
24582            Bytes::new(__input)
24583        };
24584        let mut __struct = Self::default();
24585        __struct.time_boot_ms = buf.get_u32_le();
24586        __struct.lat_int = buf.get_i32_le();
24587        __struct.lon_int = buf.get_i32_le();
24588        __struct.alt = buf.get_f32_le();
24589        __struct.vx = buf.get_f32_le();
24590        __struct.vy = buf.get_f32_le();
24591        __struct.vz = buf.get_f32_le();
24592        __struct.afx = buf.get_f32_le();
24593        __struct.afy = buf.get_f32_le();
24594        __struct.afz = buf.get_f32_le();
24595        __struct.yaw = buf.get_f32_le();
24596        __struct.yaw_rate = buf.get_f32_le();
24597        let tmp = buf.get_u16_le();
24598        __struct.type_mask =
24599            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
24600                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24601                    flag_type: "PositionTargetTypemask",
24602                    value: tmp as u64,
24603                })?;
24604        let tmp = buf.get_u8();
24605        __struct.coordinate_frame =
24606            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24607                enum_type: "MavFrame",
24608                value: tmp as u64,
24609            })?;
24610        Ok(__struct)
24611    }
24612    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24613        let mut __tmp = BytesMut::new(bytes);
24614        #[allow(clippy::absurd_extreme_comparisons)]
24615        #[allow(unused_comparisons)]
24616        if __tmp.remaining() < Self::ENCODED_LEN {
24617            panic!(
24618                "buffer is too small (need {} bytes, but got {})",
24619                Self::ENCODED_LEN,
24620                __tmp.remaining(),
24621            )
24622        }
24623        __tmp.put_u32_le(self.time_boot_ms);
24624        __tmp.put_i32_le(self.lat_int);
24625        __tmp.put_i32_le(self.lon_int);
24626        __tmp.put_f32_le(self.alt);
24627        __tmp.put_f32_le(self.vx);
24628        __tmp.put_f32_le(self.vy);
24629        __tmp.put_f32_le(self.vz);
24630        __tmp.put_f32_le(self.afx);
24631        __tmp.put_f32_le(self.afy);
24632        __tmp.put_f32_le(self.afz);
24633        __tmp.put_f32_le(self.yaw);
24634        __tmp.put_f32_le(self.yaw_rate);
24635        __tmp.put_u16_le(self.type_mask.bits() as u16);
24636        __tmp.put_u8(self.coordinate_frame as u8);
24637        if matches!(version, MavlinkVersion::V2) {
24638            let len = __tmp.len();
24639            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24640        } else {
24641            __tmp.len()
24642        }
24643    }
24644}
24645#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24646#[doc = ""]
24647#[doc = "ID: 85"]
24648#[derive(Debug, Clone, PartialEq)]
24649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24651#[cfg_attr(feature = "ts", derive(TS))]
24652#[cfg_attr(feature = "ts", ts(export))]
24653pub struct POSITION_TARGET_LOCAL_NED_DATA {
24654    #[doc = "Timestamp (time since system boot)."]
24655    pub time_boot_ms: u32,
24656    #[doc = "X Position in NED frame"]
24657    pub x: f32,
24658    #[doc = "Y Position in NED frame"]
24659    pub y: f32,
24660    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24661    pub z: f32,
24662    #[doc = "X velocity in NED frame"]
24663    pub vx: f32,
24664    #[doc = "Y velocity in NED frame"]
24665    pub vy: f32,
24666    #[doc = "Z velocity in NED frame"]
24667    pub vz: f32,
24668    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24669    pub afx: f32,
24670    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24671    pub afy: f32,
24672    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24673    pub afz: f32,
24674    #[doc = "yaw setpoint"]
24675    pub yaw: f32,
24676    #[doc = "yaw rate setpoint"]
24677    pub yaw_rate: f32,
24678    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24679    pub type_mask: PositionTargetTypemask,
24680    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24681    pub coordinate_frame: MavFrame,
24682}
24683impl POSITION_TARGET_LOCAL_NED_DATA {
24684    pub const ENCODED_LEN: usize = 51usize;
24685    pub const DEFAULT: Self = Self {
24686        time_boot_ms: 0_u32,
24687        x: 0.0_f32,
24688        y: 0.0_f32,
24689        z: 0.0_f32,
24690        vx: 0.0_f32,
24691        vy: 0.0_f32,
24692        vz: 0.0_f32,
24693        afx: 0.0_f32,
24694        afy: 0.0_f32,
24695        afz: 0.0_f32,
24696        yaw: 0.0_f32,
24697        yaw_rate: 0.0_f32,
24698        type_mask: PositionTargetTypemask::DEFAULT,
24699        coordinate_frame: MavFrame::DEFAULT,
24700    };
24701    #[cfg(feature = "arbitrary")]
24702    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24703        use arbitrary::{Arbitrary, Unstructured};
24704        let mut buf = [0u8; 1024];
24705        rng.fill_bytes(&mut buf);
24706        let mut unstructured = Unstructured::new(&buf);
24707        Self::arbitrary(&mut unstructured).unwrap_or_default()
24708    }
24709}
24710impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24711    fn default() -> Self {
24712        Self::DEFAULT.clone()
24713    }
24714}
24715impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24716    type Message = MavMessage;
24717    const ID: u32 = 85u32;
24718    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24719    const EXTRA_CRC: u8 = 140u8;
24720    const ENCODED_LEN: usize = 51usize;
24721    fn deser(
24722        _version: MavlinkVersion,
24723        __input: &[u8],
24724    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24725        let avail_len = __input.len();
24726        let mut payload_buf = [0; Self::ENCODED_LEN];
24727        let mut buf = if avail_len < Self::ENCODED_LEN {
24728            payload_buf[0..avail_len].copy_from_slice(__input);
24729            Bytes::new(&payload_buf)
24730        } else {
24731            Bytes::new(__input)
24732        };
24733        let mut __struct = Self::default();
24734        __struct.time_boot_ms = buf.get_u32_le();
24735        __struct.x = buf.get_f32_le();
24736        __struct.y = buf.get_f32_le();
24737        __struct.z = buf.get_f32_le();
24738        __struct.vx = buf.get_f32_le();
24739        __struct.vy = buf.get_f32_le();
24740        __struct.vz = buf.get_f32_le();
24741        __struct.afx = buf.get_f32_le();
24742        __struct.afy = buf.get_f32_le();
24743        __struct.afz = buf.get_f32_le();
24744        __struct.yaw = buf.get_f32_le();
24745        __struct.yaw_rate = buf.get_f32_le();
24746        let tmp = buf.get_u16_le();
24747        __struct.type_mask =
24748            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
24749                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24750                    flag_type: "PositionTargetTypemask",
24751                    value: tmp as u64,
24752                })?;
24753        let tmp = buf.get_u8();
24754        __struct.coordinate_frame =
24755            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24756                enum_type: "MavFrame",
24757                value: tmp as u64,
24758            })?;
24759        Ok(__struct)
24760    }
24761    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24762        let mut __tmp = BytesMut::new(bytes);
24763        #[allow(clippy::absurd_extreme_comparisons)]
24764        #[allow(unused_comparisons)]
24765        if __tmp.remaining() < Self::ENCODED_LEN {
24766            panic!(
24767                "buffer is too small (need {} bytes, but got {})",
24768                Self::ENCODED_LEN,
24769                __tmp.remaining(),
24770            )
24771        }
24772        __tmp.put_u32_le(self.time_boot_ms);
24773        __tmp.put_f32_le(self.x);
24774        __tmp.put_f32_le(self.y);
24775        __tmp.put_f32_le(self.z);
24776        __tmp.put_f32_le(self.vx);
24777        __tmp.put_f32_le(self.vy);
24778        __tmp.put_f32_le(self.vz);
24779        __tmp.put_f32_le(self.afx);
24780        __tmp.put_f32_le(self.afy);
24781        __tmp.put_f32_le(self.afz);
24782        __tmp.put_f32_le(self.yaw);
24783        __tmp.put_f32_le(self.yaw_rate);
24784        __tmp.put_u16_le(self.type_mask.bits() as u16);
24785        __tmp.put_u8(self.coordinate_frame as u8);
24786        if matches!(version, MavlinkVersion::V2) {
24787            let len = __tmp.len();
24788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24789        } else {
24790            __tmp.len()
24791        }
24792    }
24793}
24794#[doc = "Power supply status."]
24795#[doc = ""]
24796#[doc = "ID: 125"]
24797#[derive(Debug, Clone, PartialEq)]
24798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24800#[cfg_attr(feature = "ts", derive(TS))]
24801#[cfg_attr(feature = "ts", ts(export))]
24802pub struct POWER_STATUS_DATA {
24803    #[doc = "5V rail voltage."]
24804    pub Vcc: u16,
24805    #[doc = "Servo rail voltage."]
24806    pub Vservo: u16,
24807    #[doc = "Bitmap of power supply status flags."]
24808    pub flags: MavPowerStatus,
24809}
24810impl POWER_STATUS_DATA {
24811    pub const ENCODED_LEN: usize = 6usize;
24812    pub const DEFAULT: Self = Self {
24813        Vcc: 0_u16,
24814        Vservo: 0_u16,
24815        flags: MavPowerStatus::DEFAULT,
24816    };
24817    #[cfg(feature = "arbitrary")]
24818    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24819        use arbitrary::{Arbitrary, Unstructured};
24820        let mut buf = [0u8; 1024];
24821        rng.fill_bytes(&mut buf);
24822        let mut unstructured = Unstructured::new(&buf);
24823        Self::arbitrary(&mut unstructured).unwrap_or_default()
24824    }
24825}
24826impl Default for POWER_STATUS_DATA {
24827    fn default() -> Self {
24828        Self::DEFAULT.clone()
24829    }
24830}
24831impl MessageData for POWER_STATUS_DATA {
24832    type Message = MavMessage;
24833    const ID: u32 = 125u32;
24834    const NAME: &'static str = "POWER_STATUS";
24835    const EXTRA_CRC: u8 = 203u8;
24836    const ENCODED_LEN: usize = 6usize;
24837    fn deser(
24838        _version: MavlinkVersion,
24839        __input: &[u8],
24840    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24841        let avail_len = __input.len();
24842        let mut payload_buf = [0; Self::ENCODED_LEN];
24843        let mut buf = if avail_len < Self::ENCODED_LEN {
24844            payload_buf[0..avail_len].copy_from_slice(__input);
24845            Bytes::new(&payload_buf)
24846        } else {
24847            Bytes::new(__input)
24848        };
24849        let mut __struct = Self::default();
24850        __struct.Vcc = buf.get_u16_le();
24851        __struct.Vservo = buf.get_u16_le();
24852        let tmp = buf.get_u16_le();
24853        __struct.flags = MavPowerStatus::from_bits(tmp as <MavPowerStatus as Flags>::Bits).ok_or(
24854            ::mavlink_core::error::ParserError::InvalidFlag {
24855                flag_type: "MavPowerStatus",
24856                value: tmp as u64,
24857            },
24858        )?;
24859        Ok(__struct)
24860    }
24861    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24862        let mut __tmp = BytesMut::new(bytes);
24863        #[allow(clippy::absurd_extreme_comparisons)]
24864        #[allow(unused_comparisons)]
24865        if __tmp.remaining() < Self::ENCODED_LEN {
24866            panic!(
24867                "buffer is too small (need {} bytes, but got {})",
24868                Self::ENCODED_LEN,
24869                __tmp.remaining(),
24870            )
24871        }
24872        __tmp.put_u16_le(self.Vcc);
24873        __tmp.put_u16_le(self.Vservo);
24874        __tmp.put_u16_le(self.flags.bits() as u16);
24875        if matches!(version, MavlinkVersion::V2) {
24876            let len = __tmp.len();
24877            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24878        } else {
24879            __tmp.len()
24880        }
24881    }
24882}
24883#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
24884#[doc = ""]
24885#[doc = "ID: 300"]
24886#[derive(Debug, Clone, PartialEq)]
24887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24888#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24889#[cfg_attr(feature = "ts", derive(TS))]
24890#[cfg_attr(feature = "ts", ts(export))]
24891pub struct PROTOCOL_VERSION_DATA {
24892    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
24893    pub version: u16,
24894    #[doc = "Minimum MAVLink version supported"]
24895    pub min_version: u16,
24896    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
24897    pub max_version: u16,
24898    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24899    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24900    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24901    pub spec_version_hash: [u8; 8],
24902    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24903    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24904    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
24905    pub library_version_hash: [u8; 8],
24906}
24907impl PROTOCOL_VERSION_DATA {
24908    pub const ENCODED_LEN: usize = 22usize;
24909    pub const DEFAULT: Self = Self {
24910        version: 0_u16,
24911        min_version: 0_u16,
24912        max_version: 0_u16,
24913        spec_version_hash: [0_u8; 8usize],
24914        library_version_hash: [0_u8; 8usize],
24915    };
24916    #[cfg(feature = "arbitrary")]
24917    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24918        use arbitrary::{Arbitrary, Unstructured};
24919        let mut buf = [0u8; 1024];
24920        rng.fill_bytes(&mut buf);
24921        let mut unstructured = Unstructured::new(&buf);
24922        Self::arbitrary(&mut unstructured).unwrap_or_default()
24923    }
24924}
24925impl Default for PROTOCOL_VERSION_DATA {
24926    fn default() -> Self {
24927        Self::DEFAULT.clone()
24928    }
24929}
24930impl MessageData for PROTOCOL_VERSION_DATA {
24931    type Message = MavMessage;
24932    const ID: u32 = 300u32;
24933    const NAME: &'static str = "PROTOCOL_VERSION";
24934    const EXTRA_CRC: u8 = 217u8;
24935    const ENCODED_LEN: usize = 22usize;
24936    fn deser(
24937        _version: MavlinkVersion,
24938        __input: &[u8],
24939    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24940        let avail_len = __input.len();
24941        let mut payload_buf = [0; Self::ENCODED_LEN];
24942        let mut buf = if avail_len < Self::ENCODED_LEN {
24943            payload_buf[0..avail_len].copy_from_slice(__input);
24944            Bytes::new(&payload_buf)
24945        } else {
24946            Bytes::new(__input)
24947        };
24948        let mut __struct = Self::default();
24949        __struct.version = buf.get_u16_le();
24950        __struct.min_version = buf.get_u16_le();
24951        __struct.max_version = buf.get_u16_le();
24952        for v in &mut __struct.spec_version_hash {
24953            let val = buf.get_u8();
24954            *v = val;
24955        }
24956        for v in &mut __struct.library_version_hash {
24957            let val = buf.get_u8();
24958            *v = val;
24959        }
24960        Ok(__struct)
24961    }
24962    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24963        let mut __tmp = BytesMut::new(bytes);
24964        #[allow(clippy::absurd_extreme_comparisons)]
24965        #[allow(unused_comparisons)]
24966        if __tmp.remaining() < Self::ENCODED_LEN {
24967            panic!(
24968                "buffer is too small (need {} bytes, but got {})",
24969                Self::ENCODED_LEN,
24970                __tmp.remaining(),
24971            )
24972        }
24973        __tmp.put_u16_le(self.version);
24974        __tmp.put_u16_le(self.min_version);
24975        __tmp.put_u16_le(self.max_version);
24976        for val in &self.spec_version_hash {
24977            __tmp.put_u8(*val);
24978        }
24979        for val in &self.library_version_hash {
24980            __tmp.put_u8(*val);
24981        }
24982        if matches!(version, MavlinkVersion::V2) {
24983            let len = __tmp.len();
24984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24985        } else {
24986            __tmp.len()
24987        }
24988    }
24989}
24990#[doc = "Status generated by radio and injected into MAVLink stream."]
24991#[doc = ""]
24992#[doc = "ID: 109"]
24993#[derive(Debug, Clone, PartialEq)]
24994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24996#[cfg_attr(feature = "ts", derive(TS))]
24997#[cfg_attr(feature = "ts", ts(export))]
24998pub struct RADIO_STATUS_DATA {
24999    #[doc = "Count of radio packet receive errors (since boot)."]
25000    pub rxerrors: u16,
25001    #[doc = "Count of error corrected radio packets (since boot)."]
25002    pub fixed: u16,
25003    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25004    pub rssi: u8,
25005    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25006    pub remrssi: u8,
25007    #[doc = "Remaining free transmitter buffer space."]
25008    pub txbuf: u8,
25009    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25010    pub noise: u8,
25011    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25012    pub remnoise: u8,
25013}
25014impl RADIO_STATUS_DATA {
25015    pub const ENCODED_LEN: usize = 9usize;
25016    pub const DEFAULT: Self = Self {
25017        rxerrors: 0_u16,
25018        fixed: 0_u16,
25019        rssi: 0_u8,
25020        remrssi: 0_u8,
25021        txbuf: 0_u8,
25022        noise: 0_u8,
25023        remnoise: 0_u8,
25024    };
25025    #[cfg(feature = "arbitrary")]
25026    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25027        use arbitrary::{Arbitrary, Unstructured};
25028        let mut buf = [0u8; 1024];
25029        rng.fill_bytes(&mut buf);
25030        let mut unstructured = Unstructured::new(&buf);
25031        Self::arbitrary(&mut unstructured).unwrap_or_default()
25032    }
25033}
25034impl Default for RADIO_STATUS_DATA {
25035    fn default() -> Self {
25036        Self::DEFAULT.clone()
25037    }
25038}
25039impl MessageData for RADIO_STATUS_DATA {
25040    type Message = MavMessage;
25041    const ID: u32 = 109u32;
25042    const NAME: &'static str = "RADIO_STATUS";
25043    const EXTRA_CRC: u8 = 185u8;
25044    const ENCODED_LEN: usize = 9usize;
25045    fn deser(
25046        _version: MavlinkVersion,
25047        __input: &[u8],
25048    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25049        let avail_len = __input.len();
25050        let mut payload_buf = [0; Self::ENCODED_LEN];
25051        let mut buf = if avail_len < Self::ENCODED_LEN {
25052            payload_buf[0..avail_len].copy_from_slice(__input);
25053            Bytes::new(&payload_buf)
25054        } else {
25055            Bytes::new(__input)
25056        };
25057        let mut __struct = Self::default();
25058        __struct.rxerrors = buf.get_u16_le();
25059        __struct.fixed = buf.get_u16_le();
25060        __struct.rssi = buf.get_u8();
25061        __struct.remrssi = buf.get_u8();
25062        __struct.txbuf = buf.get_u8();
25063        __struct.noise = buf.get_u8();
25064        __struct.remnoise = buf.get_u8();
25065        Ok(__struct)
25066    }
25067    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25068        let mut __tmp = BytesMut::new(bytes);
25069        #[allow(clippy::absurd_extreme_comparisons)]
25070        #[allow(unused_comparisons)]
25071        if __tmp.remaining() < Self::ENCODED_LEN {
25072            panic!(
25073                "buffer is too small (need {} bytes, but got {})",
25074                Self::ENCODED_LEN,
25075                __tmp.remaining(),
25076            )
25077        }
25078        __tmp.put_u16_le(self.rxerrors);
25079        __tmp.put_u16_le(self.fixed);
25080        __tmp.put_u8(self.rssi);
25081        __tmp.put_u8(self.remrssi);
25082        __tmp.put_u8(self.txbuf);
25083        __tmp.put_u8(self.noise);
25084        __tmp.put_u8(self.remnoise);
25085        if matches!(version, MavlinkVersion::V2) {
25086            let len = __tmp.len();
25087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25088        } else {
25089            __tmp.len()
25090        }
25091    }
25092}
25093#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25094#[doc = ""]
25095#[doc = "ID: 27"]
25096#[derive(Debug, Clone, PartialEq)]
25097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25099#[cfg_attr(feature = "ts", derive(TS))]
25100#[cfg_attr(feature = "ts", ts(export))]
25101pub struct RAW_IMU_DATA {
25102    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25103    pub time_usec: u64,
25104    #[doc = "X acceleration (raw)"]
25105    pub xacc: i16,
25106    #[doc = "Y acceleration (raw)"]
25107    pub yacc: i16,
25108    #[doc = "Z acceleration (raw)"]
25109    pub zacc: i16,
25110    #[doc = "Angular speed around X axis (raw)"]
25111    pub xgyro: i16,
25112    #[doc = "Angular speed around Y axis (raw)"]
25113    pub ygyro: i16,
25114    #[doc = "Angular speed around Z axis (raw)"]
25115    pub zgyro: i16,
25116    #[doc = "X Magnetic field (raw)"]
25117    pub xmag: i16,
25118    #[doc = "Y Magnetic field (raw)"]
25119    pub ymag: i16,
25120    #[doc = "Z Magnetic field (raw)"]
25121    pub zmag: i16,
25122    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25123    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25124    pub id: u8,
25125    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25126    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25127    pub temperature: i16,
25128}
25129impl RAW_IMU_DATA {
25130    pub const ENCODED_LEN: usize = 29usize;
25131    pub const DEFAULT: Self = Self {
25132        time_usec: 0_u64,
25133        xacc: 0_i16,
25134        yacc: 0_i16,
25135        zacc: 0_i16,
25136        xgyro: 0_i16,
25137        ygyro: 0_i16,
25138        zgyro: 0_i16,
25139        xmag: 0_i16,
25140        ymag: 0_i16,
25141        zmag: 0_i16,
25142        id: 0_u8,
25143        temperature: 0_i16,
25144    };
25145    #[cfg(feature = "arbitrary")]
25146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25147        use arbitrary::{Arbitrary, Unstructured};
25148        let mut buf = [0u8; 1024];
25149        rng.fill_bytes(&mut buf);
25150        let mut unstructured = Unstructured::new(&buf);
25151        Self::arbitrary(&mut unstructured).unwrap_or_default()
25152    }
25153}
25154impl Default for RAW_IMU_DATA {
25155    fn default() -> Self {
25156        Self::DEFAULT.clone()
25157    }
25158}
25159impl MessageData for RAW_IMU_DATA {
25160    type Message = MavMessage;
25161    const ID: u32 = 27u32;
25162    const NAME: &'static str = "RAW_IMU";
25163    const EXTRA_CRC: u8 = 144u8;
25164    const ENCODED_LEN: usize = 29usize;
25165    fn deser(
25166        _version: MavlinkVersion,
25167        __input: &[u8],
25168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25169        let avail_len = __input.len();
25170        let mut payload_buf = [0; Self::ENCODED_LEN];
25171        let mut buf = if avail_len < Self::ENCODED_LEN {
25172            payload_buf[0..avail_len].copy_from_slice(__input);
25173            Bytes::new(&payload_buf)
25174        } else {
25175            Bytes::new(__input)
25176        };
25177        let mut __struct = Self::default();
25178        __struct.time_usec = buf.get_u64_le();
25179        __struct.xacc = buf.get_i16_le();
25180        __struct.yacc = buf.get_i16_le();
25181        __struct.zacc = buf.get_i16_le();
25182        __struct.xgyro = buf.get_i16_le();
25183        __struct.ygyro = buf.get_i16_le();
25184        __struct.zgyro = buf.get_i16_le();
25185        __struct.xmag = buf.get_i16_le();
25186        __struct.ymag = buf.get_i16_le();
25187        __struct.zmag = buf.get_i16_le();
25188        __struct.id = buf.get_u8();
25189        __struct.temperature = buf.get_i16_le();
25190        Ok(__struct)
25191    }
25192    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25193        let mut __tmp = BytesMut::new(bytes);
25194        #[allow(clippy::absurd_extreme_comparisons)]
25195        #[allow(unused_comparisons)]
25196        if __tmp.remaining() < Self::ENCODED_LEN {
25197            panic!(
25198                "buffer is too small (need {} bytes, but got {})",
25199                Self::ENCODED_LEN,
25200                __tmp.remaining(),
25201            )
25202        }
25203        __tmp.put_u64_le(self.time_usec);
25204        __tmp.put_i16_le(self.xacc);
25205        __tmp.put_i16_le(self.yacc);
25206        __tmp.put_i16_le(self.zacc);
25207        __tmp.put_i16_le(self.xgyro);
25208        __tmp.put_i16_le(self.ygyro);
25209        __tmp.put_i16_le(self.zgyro);
25210        __tmp.put_i16_le(self.xmag);
25211        __tmp.put_i16_le(self.ymag);
25212        __tmp.put_i16_le(self.zmag);
25213        if matches!(version, MavlinkVersion::V2) {
25214            __tmp.put_u8(self.id);
25215            __tmp.put_i16_le(self.temperature);
25216            let len = __tmp.len();
25217            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25218        } else {
25219            __tmp.len()
25220        }
25221    }
25222}
25223#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
25224#[doc = ""]
25225#[doc = "ID: 28"]
25226#[derive(Debug, Clone, PartialEq)]
25227#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25228#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25229#[cfg_attr(feature = "ts", derive(TS))]
25230#[cfg_attr(feature = "ts", ts(export))]
25231pub struct RAW_PRESSURE_DATA {
25232    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25233    pub time_usec: u64,
25234    #[doc = "Absolute pressure (raw)"]
25235    pub press_abs: i16,
25236    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25237    pub press_diff1: i16,
25238    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25239    pub press_diff2: i16,
25240    #[doc = "Raw Temperature measurement (raw)"]
25241    pub temperature: i16,
25242}
25243impl RAW_PRESSURE_DATA {
25244    pub const ENCODED_LEN: usize = 16usize;
25245    pub const DEFAULT: Self = Self {
25246        time_usec: 0_u64,
25247        press_abs: 0_i16,
25248        press_diff1: 0_i16,
25249        press_diff2: 0_i16,
25250        temperature: 0_i16,
25251    };
25252    #[cfg(feature = "arbitrary")]
25253    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25254        use arbitrary::{Arbitrary, Unstructured};
25255        let mut buf = [0u8; 1024];
25256        rng.fill_bytes(&mut buf);
25257        let mut unstructured = Unstructured::new(&buf);
25258        Self::arbitrary(&mut unstructured).unwrap_or_default()
25259    }
25260}
25261impl Default for RAW_PRESSURE_DATA {
25262    fn default() -> Self {
25263        Self::DEFAULT.clone()
25264    }
25265}
25266impl MessageData for RAW_PRESSURE_DATA {
25267    type Message = MavMessage;
25268    const ID: u32 = 28u32;
25269    const NAME: &'static str = "RAW_PRESSURE";
25270    const EXTRA_CRC: u8 = 67u8;
25271    const ENCODED_LEN: usize = 16usize;
25272    fn deser(
25273        _version: MavlinkVersion,
25274        __input: &[u8],
25275    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25276        let avail_len = __input.len();
25277        let mut payload_buf = [0; Self::ENCODED_LEN];
25278        let mut buf = if avail_len < Self::ENCODED_LEN {
25279            payload_buf[0..avail_len].copy_from_slice(__input);
25280            Bytes::new(&payload_buf)
25281        } else {
25282            Bytes::new(__input)
25283        };
25284        let mut __struct = Self::default();
25285        __struct.time_usec = buf.get_u64_le();
25286        __struct.press_abs = buf.get_i16_le();
25287        __struct.press_diff1 = buf.get_i16_le();
25288        __struct.press_diff2 = buf.get_i16_le();
25289        __struct.temperature = buf.get_i16_le();
25290        Ok(__struct)
25291    }
25292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25293        let mut __tmp = BytesMut::new(bytes);
25294        #[allow(clippy::absurd_extreme_comparisons)]
25295        #[allow(unused_comparisons)]
25296        if __tmp.remaining() < Self::ENCODED_LEN {
25297            panic!(
25298                "buffer is too small (need {} bytes, but got {})",
25299                Self::ENCODED_LEN,
25300                __tmp.remaining(),
25301            )
25302        }
25303        __tmp.put_u64_le(self.time_usec);
25304        __tmp.put_i16_le(self.press_abs);
25305        __tmp.put_i16_le(self.press_diff1);
25306        __tmp.put_i16_le(self.press_diff2);
25307        __tmp.put_i16_le(self.temperature);
25308        if matches!(version, MavlinkVersion::V2) {
25309            let len = __tmp.len();
25310            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25311        } else {
25312            __tmp.len()
25313        }
25314    }
25315}
25316#[doc = "RPM sensor data message."]
25317#[doc = ""]
25318#[doc = "ID: 339"]
25319#[derive(Debug, Clone, PartialEq)]
25320#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25321#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25322#[cfg_attr(feature = "ts", derive(TS))]
25323#[cfg_attr(feature = "ts", ts(export))]
25324pub struct RAW_RPM_DATA {
25325    #[doc = "Indicated rate"]
25326    pub frequency: f32,
25327    #[doc = "Index of this RPM sensor (0-indexed)"]
25328    pub index: u8,
25329}
25330impl RAW_RPM_DATA {
25331    pub const ENCODED_LEN: usize = 5usize;
25332    pub const DEFAULT: Self = Self {
25333        frequency: 0.0_f32,
25334        index: 0_u8,
25335    };
25336    #[cfg(feature = "arbitrary")]
25337    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25338        use arbitrary::{Arbitrary, Unstructured};
25339        let mut buf = [0u8; 1024];
25340        rng.fill_bytes(&mut buf);
25341        let mut unstructured = Unstructured::new(&buf);
25342        Self::arbitrary(&mut unstructured).unwrap_or_default()
25343    }
25344}
25345impl Default for RAW_RPM_DATA {
25346    fn default() -> Self {
25347        Self::DEFAULT.clone()
25348    }
25349}
25350impl MessageData for RAW_RPM_DATA {
25351    type Message = MavMessage;
25352    const ID: u32 = 339u32;
25353    const NAME: &'static str = "RAW_RPM";
25354    const EXTRA_CRC: u8 = 199u8;
25355    const ENCODED_LEN: usize = 5usize;
25356    fn deser(
25357        _version: MavlinkVersion,
25358        __input: &[u8],
25359    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25360        let avail_len = __input.len();
25361        let mut payload_buf = [0; Self::ENCODED_LEN];
25362        let mut buf = if avail_len < Self::ENCODED_LEN {
25363            payload_buf[0..avail_len].copy_from_slice(__input);
25364            Bytes::new(&payload_buf)
25365        } else {
25366            Bytes::new(__input)
25367        };
25368        let mut __struct = Self::default();
25369        __struct.frequency = buf.get_f32_le();
25370        __struct.index = buf.get_u8();
25371        Ok(__struct)
25372    }
25373    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25374        let mut __tmp = BytesMut::new(bytes);
25375        #[allow(clippy::absurd_extreme_comparisons)]
25376        #[allow(unused_comparisons)]
25377        if __tmp.remaining() < Self::ENCODED_LEN {
25378            panic!(
25379                "buffer is too small (need {} bytes, but got {})",
25380                Self::ENCODED_LEN,
25381                __tmp.remaining(),
25382            )
25383        }
25384        __tmp.put_f32_le(self.frequency);
25385        __tmp.put_u8(self.index);
25386        if matches!(version, MavlinkVersion::V2) {
25387            let len = __tmp.len();
25388            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25389        } else {
25390            __tmp.len()
25391        }
25392    }
25393}
25394#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25395#[doc = ""]
25396#[doc = "ID: 65"]
25397#[derive(Debug, Clone, PartialEq)]
25398#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25399#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25400#[cfg_attr(feature = "ts", derive(TS))]
25401#[cfg_attr(feature = "ts", ts(export))]
25402pub struct RC_CHANNELS_DATA {
25403    #[doc = "Timestamp (time since system boot)."]
25404    pub time_boot_ms: u32,
25405    #[doc = "RC channel 1 value."]
25406    pub chan1_raw: u16,
25407    #[doc = "RC channel 2 value."]
25408    pub chan2_raw: u16,
25409    #[doc = "RC channel 3 value."]
25410    pub chan3_raw: u16,
25411    #[doc = "RC channel 4 value."]
25412    pub chan4_raw: u16,
25413    #[doc = "RC channel 5 value."]
25414    pub chan5_raw: u16,
25415    #[doc = "RC channel 6 value."]
25416    pub chan6_raw: u16,
25417    #[doc = "RC channel 7 value."]
25418    pub chan7_raw: u16,
25419    #[doc = "RC channel 8 value."]
25420    pub chan8_raw: u16,
25421    #[doc = "RC channel 9 value."]
25422    pub chan9_raw: u16,
25423    #[doc = "RC channel 10 value."]
25424    pub chan10_raw: u16,
25425    #[doc = "RC channel 11 value."]
25426    pub chan11_raw: u16,
25427    #[doc = "RC channel 12 value."]
25428    pub chan12_raw: u16,
25429    #[doc = "RC channel 13 value."]
25430    pub chan13_raw: u16,
25431    #[doc = "RC channel 14 value."]
25432    pub chan14_raw: u16,
25433    #[doc = "RC channel 15 value."]
25434    pub chan15_raw: u16,
25435    #[doc = "RC channel 16 value."]
25436    pub chan16_raw: u16,
25437    #[doc = "RC channel 17 value."]
25438    pub chan17_raw: u16,
25439    #[doc = "RC channel 18 value."]
25440    pub chan18_raw: u16,
25441    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25442    pub chancount: u8,
25443    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25444    pub rssi: u8,
25445}
25446impl RC_CHANNELS_DATA {
25447    pub const ENCODED_LEN: usize = 42usize;
25448    pub const DEFAULT: Self = Self {
25449        time_boot_ms: 0_u32,
25450        chan1_raw: 0_u16,
25451        chan2_raw: 0_u16,
25452        chan3_raw: 0_u16,
25453        chan4_raw: 0_u16,
25454        chan5_raw: 0_u16,
25455        chan6_raw: 0_u16,
25456        chan7_raw: 0_u16,
25457        chan8_raw: 0_u16,
25458        chan9_raw: 0_u16,
25459        chan10_raw: 0_u16,
25460        chan11_raw: 0_u16,
25461        chan12_raw: 0_u16,
25462        chan13_raw: 0_u16,
25463        chan14_raw: 0_u16,
25464        chan15_raw: 0_u16,
25465        chan16_raw: 0_u16,
25466        chan17_raw: 0_u16,
25467        chan18_raw: 0_u16,
25468        chancount: 0_u8,
25469        rssi: 0_u8,
25470    };
25471    #[cfg(feature = "arbitrary")]
25472    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25473        use arbitrary::{Arbitrary, Unstructured};
25474        let mut buf = [0u8; 1024];
25475        rng.fill_bytes(&mut buf);
25476        let mut unstructured = Unstructured::new(&buf);
25477        Self::arbitrary(&mut unstructured).unwrap_or_default()
25478    }
25479}
25480impl Default for RC_CHANNELS_DATA {
25481    fn default() -> Self {
25482        Self::DEFAULT.clone()
25483    }
25484}
25485impl MessageData for RC_CHANNELS_DATA {
25486    type Message = MavMessage;
25487    const ID: u32 = 65u32;
25488    const NAME: &'static str = "RC_CHANNELS";
25489    const EXTRA_CRC: u8 = 118u8;
25490    const ENCODED_LEN: usize = 42usize;
25491    fn deser(
25492        _version: MavlinkVersion,
25493        __input: &[u8],
25494    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25495        let avail_len = __input.len();
25496        let mut payload_buf = [0; Self::ENCODED_LEN];
25497        let mut buf = if avail_len < Self::ENCODED_LEN {
25498            payload_buf[0..avail_len].copy_from_slice(__input);
25499            Bytes::new(&payload_buf)
25500        } else {
25501            Bytes::new(__input)
25502        };
25503        let mut __struct = Self::default();
25504        __struct.time_boot_ms = buf.get_u32_le();
25505        __struct.chan1_raw = buf.get_u16_le();
25506        __struct.chan2_raw = buf.get_u16_le();
25507        __struct.chan3_raw = buf.get_u16_le();
25508        __struct.chan4_raw = buf.get_u16_le();
25509        __struct.chan5_raw = buf.get_u16_le();
25510        __struct.chan6_raw = buf.get_u16_le();
25511        __struct.chan7_raw = buf.get_u16_le();
25512        __struct.chan8_raw = buf.get_u16_le();
25513        __struct.chan9_raw = buf.get_u16_le();
25514        __struct.chan10_raw = buf.get_u16_le();
25515        __struct.chan11_raw = buf.get_u16_le();
25516        __struct.chan12_raw = buf.get_u16_le();
25517        __struct.chan13_raw = buf.get_u16_le();
25518        __struct.chan14_raw = buf.get_u16_le();
25519        __struct.chan15_raw = buf.get_u16_le();
25520        __struct.chan16_raw = buf.get_u16_le();
25521        __struct.chan17_raw = buf.get_u16_le();
25522        __struct.chan18_raw = buf.get_u16_le();
25523        __struct.chancount = buf.get_u8();
25524        __struct.rssi = buf.get_u8();
25525        Ok(__struct)
25526    }
25527    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25528        let mut __tmp = BytesMut::new(bytes);
25529        #[allow(clippy::absurd_extreme_comparisons)]
25530        #[allow(unused_comparisons)]
25531        if __tmp.remaining() < Self::ENCODED_LEN {
25532            panic!(
25533                "buffer is too small (need {} bytes, but got {})",
25534                Self::ENCODED_LEN,
25535                __tmp.remaining(),
25536            )
25537        }
25538        __tmp.put_u32_le(self.time_boot_ms);
25539        __tmp.put_u16_le(self.chan1_raw);
25540        __tmp.put_u16_le(self.chan2_raw);
25541        __tmp.put_u16_le(self.chan3_raw);
25542        __tmp.put_u16_le(self.chan4_raw);
25543        __tmp.put_u16_le(self.chan5_raw);
25544        __tmp.put_u16_le(self.chan6_raw);
25545        __tmp.put_u16_le(self.chan7_raw);
25546        __tmp.put_u16_le(self.chan8_raw);
25547        __tmp.put_u16_le(self.chan9_raw);
25548        __tmp.put_u16_le(self.chan10_raw);
25549        __tmp.put_u16_le(self.chan11_raw);
25550        __tmp.put_u16_le(self.chan12_raw);
25551        __tmp.put_u16_le(self.chan13_raw);
25552        __tmp.put_u16_le(self.chan14_raw);
25553        __tmp.put_u16_le(self.chan15_raw);
25554        __tmp.put_u16_le(self.chan16_raw);
25555        __tmp.put_u16_le(self.chan17_raw);
25556        __tmp.put_u16_le(self.chan18_raw);
25557        __tmp.put_u8(self.chancount);
25558        __tmp.put_u8(self.rssi);
25559        if matches!(version, MavlinkVersion::V2) {
25560            let len = __tmp.len();
25561            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25562        } else {
25563            __tmp.len()
25564        }
25565    }
25566}
25567#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25568#[doc = ""]
25569#[doc = "ID: 70"]
25570#[derive(Debug, Clone, PartialEq)]
25571#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25572#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25573#[cfg_attr(feature = "ts", derive(TS))]
25574#[cfg_attr(feature = "ts", ts(export))]
25575pub struct RC_CHANNELS_OVERRIDE_DATA {
25576    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25577    pub chan1_raw: u16,
25578    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25579    pub chan2_raw: u16,
25580    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25581    pub chan3_raw: u16,
25582    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25583    pub chan4_raw: u16,
25584    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25585    pub chan5_raw: u16,
25586    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25587    pub chan6_raw: u16,
25588    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25589    pub chan7_raw: u16,
25590    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25591    pub chan8_raw: u16,
25592    #[doc = "System ID"]
25593    pub target_system: u8,
25594    #[doc = "Component ID"]
25595    pub target_component: u8,
25596    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25597    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25598    pub chan9_raw: u16,
25599    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25600    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25601    pub chan10_raw: u16,
25602    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25603    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25604    pub chan11_raw: u16,
25605    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25606    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25607    pub chan12_raw: u16,
25608    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25609    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25610    pub chan13_raw: u16,
25611    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25612    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25613    pub chan14_raw: u16,
25614    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25615    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25616    pub chan15_raw: u16,
25617    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25618    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25619    pub chan16_raw: u16,
25620    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25621    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25622    pub chan17_raw: u16,
25623    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25624    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25625    pub chan18_raw: u16,
25626}
25627impl RC_CHANNELS_OVERRIDE_DATA {
25628    pub const ENCODED_LEN: usize = 38usize;
25629    pub const DEFAULT: Self = Self {
25630        chan1_raw: 0_u16,
25631        chan2_raw: 0_u16,
25632        chan3_raw: 0_u16,
25633        chan4_raw: 0_u16,
25634        chan5_raw: 0_u16,
25635        chan6_raw: 0_u16,
25636        chan7_raw: 0_u16,
25637        chan8_raw: 0_u16,
25638        target_system: 0_u8,
25639        target_component: 0_u8,
25640        chan9_raw: 0_u16,
25641        chan10_raw: 0_u16,
25642        chan11_raw: 0_u16,
25643        chan12_raw: 0_u16,
25644        chan13_raw: 0_u16,
25645        chan14_raw: 0_u16,
25646        chan15_raw: 0_u16,
25647        chan16_raw: 0_u16,
25648        chan17_raw: 0_u16,
25649        chan18_raw: 0_u16,
25650    };
25651    #[cfg(feature = "arbitrary")]
25652    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25653        use arbitrary::{Arbitrary, Unstructured};
25654        let mut buf = [0u8; 1024];
25655        rng.fill_bytes(&mut buf);
25656        let mut unstructured = Unstructured::new(&buf);
25657        Self::arbitrary(&mut unstructured).unwrap_or_default()
25658    }
25659}
25660impl Default for RC_CHANNELS_OVERRIDE_DATA {
25661    fn default() -> Self {
25662        Self::DEFAULT.clone()
25663    }
25664}
25665impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25666    type Message = MavMessage;
25667    const ID: u32 = 70u32;
25668    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25669    const EXTRA_CRC: u8 = 124u8;
25670    const ENCODED_LEN: usize = 38usize;
25671    fn deser(
25672        _version: MavlinkVersion,
25673        __input: &[u8],
25674    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25675        let avail_len = __input.len();
25676        let mut payload_buf = [0; Self::ENCODED_LEN];
25677        let mut buf = if avail_len < Self::ENCODED_LEN {
25678            payload_buf[0..avail_len].copy_from_slice(__input);
25679            Bytes::new(&payload_buf)
25680        } else {
25681            Bytes::new(__input)
25682        };
25683        let mut __struct = Self::default();
25684        __struct.chan1_raw = buf.get_u16_le();
25685        __struct.chan2_raw = buf.get_u16_le();
25686        __struct.chan3_raw = buf.get_u16_le();
25687        __struct.chan4_raw = buf.get_u16_le();
25688        __struct.chan5_raw = buf.get_u16_le();
25689        __struct.chan6_raw = buf.get_u16_le();
25690        __struct.chan7_raw = buf.get_u16_le();
25691        __struct.chan8_raw = buf.get_u16_le();
25692        __struct.target_system = buf.get_u8();
25693        __struct.target_component = buf.get_u8();
25694        __struct.chan9_raw = buf.get_u16_le();
25695        __struct.chan10_raw = buf.get_u16_le();
25696        __struct.chan11_raw = buf.get_u16_le();
25697        __struct.chan12_raw = buf.get_u16_le();
25698        __struct.chan13_raw = buf.get_u16_le();
25699        __struct.chan14_raw = buf.get_u16_le();
25700        __struct.chan15_raw = buf.get_u16_le();
25701        __struct.chan16_raw = buf.get_u16_le();
25702        __struct.chan17_raw = buf.get_u16_le();
25703        __struct.chan18_raw = buf.get_u16_le();
25704        Ok(__struct)
25705    }
25706    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25707        let mut __tmp = BytesMut::new(bytes);
25708        #[allow(clippy::absurd_extreme_comparisons)]
25709        #[allow(unused_comparisons)]
25710        if __tmp.remaining() < Self::ENCODED_LEN {
25711            panic!(
25712                "buffer is too small (need {} bytes, but got {})",
25713                Self::ENCODED_LEN,
25714                __tmp.remaining(),
25715            )
25716        }
25717        __tmp.put_u16_le(self.chan1_raw);
25718        __tmp.put_u16_le(self.chan2_raw);
25719        __tmp.put_u16_le(self.chan3_raw);
25720        __tmp.put_u16_le(self.chan4_raw);
25721        __tmp.put_u16_le(self.chan5_raw);
25722        __tmp.put_u16_le(self.chan6_raw);
25723        __tmp.put_u16_le(self.chan7_raw);
25724        __tmp.put_u16_le(self.chan8_raw);
25725        __tmp.put_u8(self.target_system);
25726        __tmp.put_u8(self.target_component);
25727        if matches!(version, MavlinkVersion::V2) {
25728            __tmp.put_u16_le(self.chan9_raw);
25729            __tmp.put_u16_le(self.chan10_raw);
25730            __tmp.put_u16_le(self.chan11_raw);
25731            __tmp.put_u16_le(self.chan12_raw);
25732            __tmp.put_u16_le(self.chan13_raw);
25733            __tmp.put_u16_le(self.chan14_raw);
25734            __tmp.put_u16_le(self.chan15_raw);
25735            __tmp.put_u16_le(self.chan16_raw);
25736            __tmp.put_u16_le(self.chan17_raw);
25737            __tmp.put_u16_le(self.chan18_raw);
25738            let len = __tmp.len();
25739            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25740        } else {
25741            __tmp.len()
25742        }
25743    }
25744}
25745#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25746#[doc = ""]
25747#[doc = "ID: 35"]
25748#[derive(Debug, Clone, PartialEq)]
25749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25751#[cfg_attr(feature = "ts", derive(TS))]
25752#[cfg_attr(feature = "ts", ts(export))]
25753pub struct RC_CHANNELS_RAW_DATA {
25754    #[doc = "Timestamp (time since system boot)."]
25755    pub time_boot_ms: u32,
25756    #[doc = "RC channel 1 value."]
25757    pub chan1_raw: u16,
25758    #[doc = "RC channel 2 value."]
25759    pub chan2_raw: u16,
25760    #[doc = "RC channel 3 value."]
25761    pub chan3_raw: u16,
25762    #[doc = "RC channel 4 value."]
25763    pub chan4_raw: u16,
25764    #[doc = "RC channel 5 value."]
25765    pub chan5_raw: u16,
25766    #[doc = "RC channel 6 value."]
25767    pub chan6_raw: u16,
25768    #[doc = "RC channel 7 value."]
25769    pub chan7_raw: u16,
25770    #[doc = "RC channel 8 value."]
25771    pub chan8_raw: u16,
25772    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25773    pub port: u8,
25774    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25775    pub rssi: u8,
25776}
25777impl RC_CHANNELS_RAW_DATA {
25778    pub const ENCODED_LEN: usize = 22usize;
25779    pub const DEFAULT: Self = Self {
25780        time_boot_ms: 0_u32,
25781        chan1_raw: 0_u16,
25782        chan2_raw: 0_u16,
25783        chan3_raw: 0_u16,
25784        chan4_raw: 0_u16,
25785        chan5_raw: 0_u16,
25786        chan6_raw: 0_u16,
25787        chan7_raw: 0_u16,
25788        chan8_raw: 0_u16,
25789        port: 0_u8,
25790        rssi: 0_u8,
25791    };
25792    #[cfg(feature = "arbitrary")]
25793    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25794        use arbitrary::{Arbitrary, Unstructured};
25795        let mut buf = [0u8; 1024];
25796        rng.fill_bytes(&mut buf);
25797        let mut unstructured = Unstructured::new(&buf);
25798        Self::arbitrary(&mut unstructured).unwrap_or_default()
25799    }
25800}
25801impl Default for RC_CHANNELS_RAW_DATA {
25802    fn default() -> Self {
25803        Self::DEFAULT.clone()
25804    }
25805}
25806impl MessageData for RC_CHANNELS_RAW_DATA {
25807    type Message = MavMessage;
25808    const ID: u32 = 35u32;
25809    const NAME: &'static str = "RC_CHANNELS_RAW";
25810    const EXTRA_CRC: u8 = 244u8;
25811    const ENCODED_LEN: usize = 22usize;
25812    fn deser(
25813        _version: MavlinkVersion,
25814        __input: &[u8],
25815    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25816        let avail_len = __input.len();
25817        let mut payload_buf = [0; Self::ENCODED_LEN];
25818        let mut buf = if avail_len < Self::ENCODED_LEN {
25819            payload_buf[0..avail_len].copy_from_slice(__input);
25820            Bytes::new(&payload_buf)
25821        } else {
25822            Bytes::new(__input)
25823        };
25824        let mut __struct = Self::default();
25825        __struct.time_boot_ms = buf.get_u32_le();
25826        __struct.chan1_raw = buf.get_u16_le();
25827        __struct.chan2_raw = buf.get_u16_le();
25828        __struct.chan3_raw = buf.get_u16_le();
25829        __struct.chan4_raw = buf.get_u16_le();
25830        __struct.chan5_raw = buf.get_u16_le();
25831        __struct.chan6_raw = buf.get_u16_le();
25832        __struct.chan7_raw = buf.get_u16_le();
25833        __struct.chan8_raw = buf.get_u16_le();
25834        __struct.port = buf.get_u8();
25835        __struct.rssi = buf.get_u8();
25836        Ok(__struct)
25837    }
25838    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25839        let mut __tmp = BytesMut::new(bytes);
25840        #[allow(clippy::absurd_extreme_comparisons)]
25841        #[allow(unused_comparisons)]
25842        if __tmp.remaining() < Self::ENCODED_LEN {
25843            panic!(
25844                "buffer is too small (need {} bytes, but got {})",
25845                Self::ENCODED_LEN,
25846                __tmp.remaining(),
25847            )
25848        }
25849        __tmp.put_u32_le(self.time_boot_ms);
25850        __tmp.put_u16_le(self.chan1_raw);
25851        __tmp.put_u16_le(self.chan2_raw);
25852        __tmp.put_u16_le(self.chan3_raw);
25853        __tmp.put_u16_le(self.chan4_raw);
25854        __tmp.put_u16_le(self.chan5_raw);
25855        __tmp.put_u16_le(self.chan6_raw);
25856        __tmp.put_u16_le(self.chan7_raw);
25857        __tmp.put_u16_le(self.chan8_raw);
25858        __tmp.put_u8(self.port);
25859        __tmp.put_u8(self.rssi);
25860        if matches!(version, MavlinkVersion::V2) {
25861            let len = __tmp.len();
25862            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25863        } else {
25864            __tmp.len()
25865        }
25866    }
25867}
25868#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25869#[doc = ""]
25870#[doc = "ID: 34"]
25871#[derive(Debug, Clone, PartialEq)]
25872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25874#[cfg_attr(feature = "ts", derive(TS))]
25875#[cfg_attr(feature = "ts", ts(export))]
25876pub struct RC_CHANNELS_SCALED_DATA {
25877    #[doc = "Timestamp (time since system boot)."]
25878    pub time_boot_ms: u32,
25879    #[doc = "RC channel 1 value scaled."]
25880    pub chan1_scaled: i16,
25881    #[doc = "RC channel 2 value scaled."]
25882    pub chan2_scaled: i16,
25883    #[doc = "RC channel 3 value scaled."]
25884    pub chan3_scaled: i16,
25885    #[doc = "RC channel 4 value scaled."]
25886    pub chan4_scaled: i16,
25887    #[doc = "RC channel 5 value scaled."]
25888    pub chan5_scaled: i16,
25889    #[doc = "RC channel 6 value scaled."]
25890    pub chan6_scaled: i16,
25891    #[doc = "RC channel 7 value scaled."]
25892    pub chan7_scaled: i16,
25893    #[doc = "RC channel 8 value scaled."]
25894    pub chan8_scaled: i16,
25895    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25896    pub port: u8,
25897    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25898    pub rssi: u8,
25899}
25900impl RC_CHANNELS_SCALED_DATA {
25901    pub const ENCODED_LEN: usize = 22usize;
25902    pub const DEFAULT: Self = Self {
25903        time_boot_ms: 0_u32,
25904        chan1_scaled: 0_i16,
25905        chan2_scaled: 0_i16,
25906        chan3_scaled: 0_i16,
25907        chan4_scaled: 0_i16,
25908        chan5_scaled: 0_i16,
25909        chan6_scaled: 0_i16,
25910        chan7_scaled: 0_i16,
25911        chan8_scaled: 0_i16,
25912        port: 0_u8,
25913        rssi: 0_u8,
25914    };
25915    #[cfg(feature = "arbitrary")]
25916    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25917        use arbitrary::{Arbitrary, Unstructured};
25918        let mut buf = [0u8; 1024];
25919        rng.fill_bytes(&mut buf);
25920        let mut unstructured = Unstructured::new(&buf);
25921        Self::arbitrary(&mut unstructured).unwrap_or_default()
25922    }
25923}
25924impl Default for RC_CHANNELS_SCALED_DATA {
25925    fn default() -> Self {
25926        Self::DEFAULT.clone()
25927    }
25928}
25929impl MessageData for RC_CHANNELS_SCALED_DATA {
25930    type Message = MavMessage;
25931    const ID: u32 = 34u32;
25932    const NAME: &'static str = "RC_CHANNELS_SCALED";
25933    const EXTRA_CRC: u8 = 237u8;
25934    const ENCODED_LEN: usize = 22usize;
25935    fn deser(
25936        _version: MavlinkVersion,
25937        __input: &[u8],
25938    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25939        let avail_len = __input.len();
25940        let mut payload_buf = [0; Self::ENCODED_LEN];
25941        let mut buf = if avail_len < Self::ENCODED_LEN {
25942            payload_buf[0..avail_len].copy_from_slice(__input);
25943            Bytes::new(&payload_buf)
25944        } else {
25945            Bytes::new(__input)
25946        };
25947        let mut __struct = Self::default();
25948        __struct.time_boot_ms = buf.get_u32_le();
25949        __struct.chan1_scaled = buf.get_i16_le();
25950        __struct.chan2_scaled = buf.get_i16_le();
25951        __struct.chan3_scaled = buf.get_i16_le();
25952        __struct.chan4_scaled = buf.get_i16_le();
25953        __struct.chan5_scaled = buf.get_i16_le();
25954        __struct.chan6_scaled = buf.get_i16_le();
25955        __struct.chan7_scaled = buf.get_i16_le();
25956        __struct.chan8_scaled = buf.get_i16_le();
25957        __struct.port = buf.get_u8();
25958        __struct.rssi = buf.get_u8();
25959        Ok(__struct)
25960    }
25961    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25962        let mut __tmp = BytesMut::new(bytes);
25963        #[allow(clippy::absurd_extreme_comparisons)]
25964        #[allow(unused_comparisons)]
25965        if __tmp.remaining() < Self::ENCODED_LEN {
25966            panic!(
25967                "buffer is too small (need {} bytes, but got {})",
25968                Self::ENCODED_LEN,
25969                __tmp.remaining(),
25970            )
25971        }
25972        __tmp.put_u32_le(self.time_boot_ms);
25973        __tmp.put_i16_le(self.chan1_scaled);
25974        __tmp.put_i16_le(self.chan2_scaled);
25975        __tmp.put_i16_le(self.chan3_scaled);
25976        __tmp.put_i16_le(self.chan4_scaled);
25977        __tmp.put_i16_le(self.chan5_scaled);
25978        __tmp.put_i16_le(self.chan6_scaled);
25979        __tmp.put_i16_le(self.chan7_scaled);
25980        __tmp.put_i16_le(self.chan8_scaled);
25981        __tmp.put_u8(self.port);
25982        __tmp.put_u8(self.rssi);
25983        if matches!(version, MavlinkVersion::V2) {
25984            let len = __tmp.len();
25985            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25986        } else {
25987            __tmp.len()
25988        }
25989    }
25990}
25991#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
25992#[doc = "Request a data stream."]
25993#[doc = ""]
25994#[doc = "ID: 66"]
25995#[derive(Debug, Clone, PartialEq)]
25996#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25998#[cfg_attr(feature = "ts", derive(TS))]
25999#[cfg_attr(feature = "ts", ts(export))]
26000pub struct REQUEST_DATA_STREAM_DATA {
26001    #[doc = "The requested message rate"]
26002    pub req_message_rate: u16,
26003    #[doc = "The target requested to send the message stream."]
26004    pub target_system: u8,
26005    #[doc = "The target requested to send the message stream."]
26006    pub target_component: u8,
26007    #[doc = "The ID of the requested data stream"]
26008    pub req_stream_id: u8,
26009    #[doc = "1 to start sending, 0 to stop sending."]
26010    pub start_stop: u8,
26011}
26012impl REQUEST_DATA_STREAM_DATA {
26013    pub const ENCODED_LEN: usize = 6usize;
26014    pub const DEFAULT: Self = Self {
26015        req_message_rate: 0_u16,
26016        target_system: 0_u8,
26017        target_component: 0_u8,
26018        req_stream_id: 0_u8,
26019        start_stop: 0_u8,
26020    };
26021    #[cfg(feature = "arbitrary")]
26022    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26023        use arbitrary::{Arbitrary, Unstructured};
26024        let mut buf = [0u8; 1024];
26025        rng.fill_bytes(&mut buf);
26026        let mut unstructured = Unstructured::new(&buf);
26027        Self::arbitrary(&mut unstructured).unwrap_or_default()
26028    }
26029}
26030impl Default for REQUEST_DATA_STREAM_DATA {
26031    fn default() -> Self {
26032        Self::DEFAULT.clone()
26033    }
26034}
26035impl MessageData for REQUEST_DATA_STREAM_DATA {
26036    type Message = MavMessage;
26037    const ID: u32 = 66u32;
26038    const NAME: &'static str = "REQUEST_DATA_STREAM";
26039    const EXTRA_CRC: u8 = 148u8;
26040    const ENCODED_LEN: usize = 6usize;
26041    fn deser(
26042        _version: MavlinkVersion,
26043        __input: &[u8],
26044    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26045        let avail_len = __input.len();
26046        let mut payload_buf = [0; Self::ENCODED_LEN];
26047        let mut buf = if avail_len < Self::ENCODED_LEN {
26048            payload_buf[0..avail_len].copy_from_slice(__input);
26049            Bytes::new(&payload_buf)
26050        } else {
26051            Bytes::new(__input)
26052        };
26053        let mut __struct = Self::default();
26054        __struct.req_message_rate = buf.get_u16_le();
26055        __struct.target_system = buf.get_u8();
26056        __struct.target_component = buf.get_u8();
26057        __struct.req_stream_id = buf.get_u8();
26058        __struct.start_stop = buf.get_u8();
26059        Ok(__struct)
26060    }
26061    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26062        let mut __tmp = BytesMut::new(bytes);
26063        #[allow(clippy::absurd_extreme_comparisons)]
26064        #[allow(unused_comparisons)]
26065        if __tmp.remaining() < Self::ENCODED_LEN {
26066            panic!(
26067                "buffer is too small (need {} bytes, but got {})",
26068                Self::ENCODED_LEN,
26069                __tmp.remaining(),
26070            )
26071        }
26072        __tmp.put_u16_le(self.req_message_rate);
26073        __tmp.put_u8(self.target_system);
26074        __tmp.put_u8(self.target_component);
26075        __tmp.put_u8(self.req_stream_id);
26076        __tmp.put_u8(self.start_stop);
26077        if matches!(version, MavlinkVersion::V2) {
26078            let len = __tmp.len();
26079            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26080        } else {
26081            __tmp.len()
26082        }
26083    }
26084}
26085#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26086#[doc = ""]
26087#[doc = "ID: 412"]
26088#[derive(Debug, Clone, PartialEq)]
26089#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26090#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26091#[cfg_attr(feature = "ts", derive(TS))]
26092#[cfg_attr(feature = "ts", ts(export))]
26093pub struct REQUEST_EVENT_DATA {
26094    #[doc = "First sequence number of the requested event."]
26095    pub first_sequence: u16,
26096    #[doc = "Last sequence number of the requested event."]
26097    pub last_sequence: u16,
26098    #[doc = "System ID"]
26099    pub target_system: u8,
26100    #[doc = "Component ID"]
26101    pub target_component: u8,
26102}
26103impl REQUEST_EVENT_DATA {
26104    pub const ENCODED_LEN: usize = 6usize;
26105    pub const DEFAULT: Self = Self {
26106        first_sequence: 0_u16,
26107        last_sequence: 0_u16,
26108        target_system: 0_u8,
26109        target_component: 0_u8,
26110    };
26111    #[cfg(feature = "arbitrary")]
26112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26113        use arbitrary::{Arbitrary, Unstructured};
26114        let mut buf = [0u8; 1024];
26115        rng.fill_bytes(&mut buf);
26116        let mut unstructured = Unstructured::new(&buf);
26117        Self::arbitrary(&mut unstructured).unwrap_or_default()
26118    }
26119}
26120impl Default for REQUEST_EVENT_DATA {
26121    fn default() -> Self {
26122        Self::DEFAULT.clone()
26123    }
26124}
26125impl MessageData for REQUEST_EVENT_DATA {
26126    type Message = MavMessage;
26127    const ID: u32 = 412u32;
26128    const NAME: &'static str = "REQUEST_EVENT";
26129    const EXTRA_CRC: u8 = 33u8;
26130    const ENCODED_LEN: usize = 6usize;
26131    fn deser(
26132        _version: MavlinkVersion,
26133        __input: &[u8],
26134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26135        let avail_len = __input.len();
26136        let mut payload_buf = [0; Self::ENCODED_LEN];
26137        let mut buf = if avail_len < Self::ENCODED_LEN {
26138            payload_buf[0..avail_len].copy_from_slice(__input);
26139            Bytes::new(&payload_buf)
26140        } else {
26141            Bytes::new(__input)
26142        };
26143        let mut __struct = Self::default();
26144        __struct.first_sequence = buf.get_u16_le();
26145        __struct.last_sequence = buf.get_u16_le();
26146        __struct.target_system = buf.get_u8();
26147        __struct.target_component = buf.get_u8();
26148        Ok(__struct)
26149    }
26150    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26151        let mut __tmp = BytesMut::new(bytes);
26152        #[allow(clippy::absurd_extreme_comparisons)]
26153        #[allow(unused_comparisons)]
26154        if __tmp.remaining() < Self::ENCODED_LEN {
26155            panic!(
26156                "buffer is too small (need {} bytes, but got {})",
26157                Self::ENCODED_LEN,
26158                __tmp.remaining(),
26159            )
26160        }
26161        __tmp.put_u16_le(self.first_sequence);
26162        __tmp.put_u16_le(self.last_sequence);
26163        __tmp.put_u8(self.target_system);
26164        __tmp.put_u8(self.target_component);
26165        if matches!(version, MavlinkVersion::V2) {
26166            let len = __tmp.len();
26167            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26168        } else {
26169            __tmp.len()
26170        }
26171    }
26172}
26173#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26174#[doc = ""]
26175#[doc = "ID: 142"]
26176#[derive(Debug, Clone, PartialEq)]
26177#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26179#[cfg_attr(feature = "ts", derive(TS))]
26180#[cfg_attr(feature = "ts", ts(export))]
26181pub struct RESOURCE_REQUEST_DATA {
26182    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26183    pub request_id: u8,
26184    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26185    pub uri_type: u8,
26186    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
26187    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26188    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26189    pub uri: [u8; 120],
26190    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
26191    pub transfer_type: u8,
26192    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
26193    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26194    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26195    pub storage: [u8; 120],
26196}
26197impl RESOURCE_REQUEST_DATA {
26198    pub const ENCODED_LEN: usize = 243usize;
26199    pub const DEFAULT: Self = Self {
26200        request_id: 0_u8,
26201        uri_type: 0_u8,
26202        uri: [0_u8; 120usize],
26203        transfer_type: 0_u8,
26204        storage: [0_u8; 120usize],
26205    };
26206    #[cfg(feature = "arbitrary")]
26207    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26208        use arbitrary::{Arbitrary, Unstructured};
26209        let mut buf = [0u8; 1024];
26210        rng.fill_bytes(&mut buf);
26211        let mut unstructured = Unstructured::new(&buf);
26212        Self::arbitrary(&mut unstructured).unwrap_or_default()
26213    }
26214}
26215impl Default for RESOURCE_REQUEST_DATA {
26216    fn default() -> Self {
26217        Self::DEFAULT.clone()
26218    }
26219}
26220impl MessageData for RESOURCE_REQUEST_DATA {
26221    type Message = MavMessage;
26222    const ID: u32 = 142u32;
26223    const NAME: &'static str = "RESOURCE_REQUEST";
26224    const EXTRA_CRC: u8 = 72u8;
26225    const ENCODED_LEN: usize = 243usize;
26226    fn deser(
26227        _version: MavlinkVersion,
26228        __input: &[u8],
26229    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26230        let avail_len = __input.len();
26231        let mut payload_buf = [0; Self::ENCODED_LEN];
26232        let mut buf = if avail_len < Self::ENCODED_LEN {
26233            payload_buf[0..avail_len].copy_from_slice(__input);
26234            Bytes::new(&payload_buf)
26235        } else {
26236            Bytes::new(__input)
26237        };
26238        let mut __struct = Self::default();
26239        __struct.request_id = buf.get_u8();
26240        __struct.uri_type = buf.get_u8();
26241        for v in &mut __struct.uri {
26242            let val = buf.get_u8();
26243            *v = val;
26244        }
26245        __struct.transfer_type = buf.get_u8();
26246        for v in &mut __struct.storage {
26247            let val = buf.get_u8();
26248            *v = val;
26249        }
26250        Ok(__struct)
26251    }
26252    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26253        let mut __tmp = BytesMut::new(bytes);
26254        #[allow(clippy::absurd_extreme_comparisons)]
26255        #[allow(unused_comparisons)]
26256        if __tmp.remaining() < Self::ENCODED_LEN {
26257            panic!(
26258                "buffer is too small (need {} bytes, but got {})",
26259                Self::ENCODED_LEN,
26260                __tmp.remaining(),
26261            )
26262        }
26263        __tmp.put_u8(self.request_id);
26264        __tmp.put_u8(self.uri_type);
26265        for val in &self.uri {
26266            __tmp.put_u8(*val);
26267        }
26268        __tmp.put_u8(self.transfer_type);
26269        for val in &self.storage {
26270            __tmp.put_u8(*val);
26271        }
26272        if matches!(version, MavlinkVersion::V2) {
26273            let len = __tmp.len();
26274            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26275        } else {
26276            __tmp.len()
26277        }
26278    }
26279}
26280#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26281#[doc = ""]
26282#[doc = "ID: 413"]
26283#[derive(Debug, Clone, PartialEq)]
26284#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26285#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26286#[cfg_attr(feature = "ts", derive(TS))]
26287#[cfg_attr(feature = "ts", ts(export))]
26288pub struct RESPONSE_EVENT_ERROR_DATA {
26289    #[doc = "Sequence number."]
26290    pub sequence: u16,
26291    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26292    pub sequence_oldest_available: u16,
26293    #[doc = "System ID"]
26294    pub target_system: u8,
26295    #[doc = "Component ID"]
26296    pub target_component: u8,
26297    #[doc = "Error reason."]
26298    pub reason: MavEventErrorReason,
26299}
26300impl RESPONSE_EVENT_ERROR_DATA {
26301    pub const ENCODED_LEN: usize = 7usize;
26302    pub const DEFAULT: Self = Self {
26303        sequence: 0_u16,
26304        sequence_oldest_available: 0_u16,
26305        target_system: 0_u8,
26306        target_component: 0_u8,
26307        reason: MavEventErrorReason::DEFAULT,
26308    };
26309    #[cfg(feature = "arbitrary")]
26310    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26311        use arbitrary::{Arbitrary, Unstructured};
26312        let mut buf = [0u8; 1024];
26313        rng.fill_bytes(&mut buf);
26314        let mut unstructured = Unstructured::new(&buf);
26315        Self::arbitrary(&mut unstructured).unwrap_or_default()
26316    }
26317}
26318impl Default for RESPONSE_EVENT_ERROR_DATA {
26319    fn default() -> Self {
26320        Self::DEFAULT.clone()
26321    }
26322}
26323impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26324    type Message = MavMessage;
26325    const ID: u32 = 413u32;
26326    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26327    const EXTRA_CRC: u8 = 77u8;
26328    const ENCODED_LEN: usize = 7usize;
26329    fn deser(
26330        _version: MavlinkVersion,
26331        __input: &[u8],
26332    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26333        let avail_len = __input.len();
26334        let mut payload_buf = [0; Self::ENCODED_LEN];
26335        let mut buf = if avail_len < Self::ENCODED_LEN {
26336            payload_buf[0..avail_len].copy_from_slice(__input);
26337            Bytes::new(&payload_buf)
26338        } else {
26339            Bytes::new(__input)
26340        };
26341        let mut __struct = Self::default();
26342        __struct.sequence = buf.get_u16_le();
26343        __struct.sequence_oldest_available = buf.get_u16_le();
26344        __struct.target_system = buf.get_u8();
26345        __struct.target_component = buf.get_u8();
26346        let tmp = buf.get_u8();
26347        __struct.reason =
26348            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26349                enum_type: "MavEventErrorReason",
26350                value: tmp as u64,
26351            })?;
26352        Ok(__struct)
26353    }
26354    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26355        let mut __tmp = BytesMut::new(bytes);
26356        #[allow(clippy::absurd_extreme_comparisons)]
26357        #[allow(unused_comparisons)]
26358        if __tmp.remaining() < Self::ENCODED_LEN {
26359            panic!(
26360                "buffer is too small (need {} bytes, but got {})",
26361                Self::ENCODED_LEN,
26362                __tmp.remaining(),
26363            )
26364        }
26365        __tmp.put_u16_le(self.sequence);
26366        __tmp.put_u16_le(self.sequence_oldest_available);
26367        __tmp.put_u8(self.target_system);
26368        __tmp.put_u8(self.target_component);
26369        __tmp.put_u8(self.reason as u8);
26370        if matches!(version, MavlinkVersion::V2) {
26371            let len = __tmp.len();
26372            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26373        } else {
26374            __tmp.len()
26375        }
26376    }
26377}
26378#[doc = "Read out the safety zone the MAV currently assumes."]
26379#[doc = ""]
26380#[doc = "ID: 55"]
26381#[derive(Debug, Clone, PartialEq)]
26382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26384#[cfg_attr(feature = "ts", derive(TS))]
26385#[cfg_attr(feature = "ts", ts(export))]
26386pub struct SAFETY_ALLOWED_AREA_DATA {
26387    #[doc = "x position 1 / Latitude 1"]
26388    pub p1x: f32,
26389    #[doc = "y position 1 / Longitude 1"]
26390    pub p1y: f32,
26391    #[doc = "z position 1 / Altitude 1"]
26392    pub p1z: f32,
26393    #[doc = "x position 2 / Latitude 2"]
26394    pub p2x: f32,
26395    #[doc = "y position 2 / Longitude 2"]
26396    pub p2y: f32,
26397    #[doc = "z position 2 / Altitude 2"]
26398    pub p2z: f32,
26399    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26400    pub frame: MavFrame,
26401}
26402impl SAFETY_ALLOWED_AREA_DATA {
26403    pub const ENCODED_LEN: usize = 25usize;
26404    pub const DEFAULT: Self = Self {
26405        p1x: 0.0_f32,
26406        p1y: 0.0_f32,
26407        p1z: 0.0_f32,
26408        p2x: 0.0_f32,
26409        p2y: 0.0_f32,
26410        p2z: 0.0_f32,
26411        frame: MavFrame::DEFAULT,
26412    };
26413    #[cfg(feature = "arbitrary")]
26414    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26415        use arbitrary::{Arbitrary, Unstructured};
26416        let mut buf = [0u8; 1024];
26417        rng.fill_bytes(&mut buf);
26418        let mut unstructured = Unstructured::new(&buf);
26419        Self::arbitrary(&mut unstructured).unwrap_or_default()
26420    }
26421}
26422impl Default for SAFETY_ALLOWED_AREA_DATA {
26423    fn default() -> Self {
26424        Self::DEFAULT.clone()
26425    }
26426}
26427impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26428    type Message = MavMessage;
26429    const ID: u32 = 55u32;
26430    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26431    const EXTRA_CRC: u8 = 3u8;
26432    const ENCODED_LEN: usize = 25usize;
26433    fn deser(
26434        _version: MavlinkVersion,
26435        __input: &[u8],
26436    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26437        let avail_len = __input.len();
26438        let mut payload_buf = [0; Self::ENCODED_LEN];
26439        let mut buf = if avail_len < Self::ENCODED_LEN {
26440            payload_buf[0..avail_len].copy_from_slice(__input);
26441            Bytes::new(&payload_buf)
26442        } else {
26443            Bytes::new(__input)
26444        };
26445        let mut __struct = Self::default();
26446        __struct.p1x = buf.get_f32_le();
26447        __struct.p1y = buf.get_f32_le();
26448        __struct.p1z = buf.get_f32_le();
26449        __struct.p2x = buf.get_f32_le();
26450        __struct.p2y = buf.get_f32_le();
26451        __struct.p2z = buf.get_f32_le();
26452        let tmp = buf.get_u8();
26453        __struct.frame =
26454            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26455                enum_type: "MavFrame",
26456                value: tmp as u64,
26457            })?;
26458        Ok(__struct)
26459    }
26460    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26461        let mut __tmp = BytesMut::new(bytes);
26462        #[allow(clippy::absurd_extreme_comparisons)]
26463        #[allow(unused_comparisons)]
26464        if __tmp.remaining() < Self::ENCODED_LEN {
26465            panic!(
26466                "buffer is too small (need {} bytes, but got {})",
26467                Self::ENCODED_LEN,
26468                __tmp.remaining(),
26469            )
26470        }
26471        __tmp.put_f32_le(self.p1x);
26472        __tmp.put_f32_le(self.p1y);
26473        __tmp.put_f32_le(self.p1z);
26474        __tmp.put_f32_le(self.p2x);
26475        __tmp.put_f32_le(self.p2y);
26476        __tmp.put_f32_le(self.p2z);
26477        __tmp.put_u8(self.frame as u8);
26478        if matches!(version, MavlinkVersion::V2) {
26479            let len = __tmp.len();
26480            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26481        } else {
26482            __tmp.len()
26483        }
26484    }
26485}
26486#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26487#[doc = ""]
26488#[doc = "ID: 54"]
26489#[derive(Debug, Clone, PartialEq)]
26490#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26491#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26492#[cfg_attr(feature = "ts", derive(TS))]
26493#[cfg_attr(feature = "ts", ts(export))]
26494pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26495    #[doc = "x position 1 / Latitude 1"]
26496    pub p1x: f32,
26497    #[doc = "y position 1 / Longitude 1"]
26498    pub p1y: f32,
26499    #[doc = "z position 1 / Altitude 1"]
26500    pub p1z: f32,
26501    #[doc = "x position 2 / Latitude 2"]
26502    pub p2x: f32,
26503    #[doc = "y position 2 / Longitude 2"]
26504    pub p2y: f32,
26505    #[doc = "z position 2 / Altitude 2"]
26506    pub p2z: f32,
26507    #[doc = "System ID"]
26508    pub target_system: u8,
26509    #[doc = "Component ID"]
26510    pub target_component: u8,
26511    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26512    pub frame: MavFrame,
26513}
26514impl SAFETY_SET_ALLOWED_AREA_DATA {
26515    pub const ENCODED_LEN: usize = 27usize;
26516    pub const DEFAULT: Self = Self {
26517        p1x: 0.0_f32,
26518        p1y: 0.0_f32,
26519        p1z: 0.0_f32,
26520        p2x: 0.0_f32,
26521        p2y: 0.0_f32,
26522        p2z: 0.0_f32,
26523        target_system: 0_u8,
26524        target_component: 0_u8,
26525        frame: MavFrame::DEFAULT,
26526    };
26527    #[cfg(feature = "arbitrary")]
26528    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26529        use arbitrary::{Arbitrary, Unstructured};
26530        let mut buf = [0u8; 1024];
26531        rng.fill_bytes(&mut buf);
26532        let mut unstructured = Unstructured::new(&buf);
26533        Self::arbitrary(&mut unstructured).unwrap_or_default()
26534    }
26535}
26536impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26537    fn default() -> Self {
26538        Self::DEFAULT.clone()
26539    }
26540}
26541impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26542    type Message = MavMessage;
26543    const ID: u32 = 54u32;
26544    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26545    const EXTRA_CRC: u8 = 15u8;
26546    const ENCODED_LEN: usize = 27usize;
26547    fn deser(
26548        _version: MavlinkVersion,
26549        __input: &[u8],
26550    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26551        let avail_len = __input.len();
26552        let mut payload_buf = [0; Self::ENCODED_LEN];
26553        let mut buf = if avail_len < Self::ENCODED_LEN {
26554            payload_buf[0..avail_len].copy_from_slice(__input);
26555            Bytes::new(&payload_buf)
26556        } else {
26557            Bytes::new(__input)
26558        };
26559        let mut __struct = Self::default();
26560        __struct.p1x = buf.get_f32_le();
26561        __struct.p1y = buf.get_f32_le();
26562        __struct.p1z = buf.get_f32_le();
26563        __struct.p2x = buf.get_f32_le();
26564        __struct.p2y = buf.get_f32_le();
26565        __struct.p2z = buf.get_f32_le();
26566        __struct.target_system = buf.get_u8();
26567        __struct.target_component = buf.get_u8();
26568        let tmp = buf.get_u8();
26569        __struct.frame =
26570            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26571                enum_type: "MavFrame",
26572                value: tmp as u64,
26573            })?;
26574        Ok(__struct)
26575    }
26576    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26577        let mut __tmp = BytesMut::new(bytes);
26578        #[allow(clippy::absurd_extreme_comparisons)]
26579        #[allow(unused_comparisons)]
26580        if __tmp.remaining() < Self::ENCODED_LEN {
26581            panic!(
26582                "buffer is too small (need {} bytes, but got {})",
26583                Self::ENCODED_LEN,
26584                __tmp.remaining(),
26585            )
26586        }
26587        __tmp.put_f32_le(self.p1x);
26588        __tmp.put_f32_le(self.p1y);
26589        __tmp.put_f32_le(self.p1z);
26590        __tmp.put_f32_le(self.p2x);
26591        __tmp.put_f32_le(self.p2y);
26592        __tmp.put_f32_le(self.p2z);
26593        __tmp.put_u8(self.target_system);
26594        __tmp.put_u8(self.target_component);
26595        __tmp.put_u8(self.frame as u8);
26596        if matches!(version, MavlinkVersion::V2) {
26597            let len = __tmp.len();
26598            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26599        } else {
26600            __tmp.len()
26601        }
26602    }
26603}
26604#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26605#[doc = ""]
26606#[doc = "ID: 26"]
26607#[derive(Debug, Clone, PartialEq)]
26608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26610#[cfg_attr(feature = "ts", derive(TS))]
26611#[cfg_attr(feature = "ts", ts(export))]
26612pub struct SCALED_IMU_DATA {
26613    #[doc = "Timestamp (time since system boot)."]
26614    pub time_boot_ms: u32,
26615    #[doc = "X acceleration"]
26616    pub xacc: i16,
26617    #[doc = "Y acceleration"]
26618    pub yacc: i16,
26619    #[doc = "Z acceleration"]
26620    pub zacc: i16,
26621    #[doc = "Angular speed around X axis"]
26622    pub xgyro: i16,
26623    #[doc = "Angular speed around Y axis"]
26624    pub ygyro: i16,
26625    #[doc = "Angular speed around Z axis"]
26626    pub zgyro: i16,
26627    #[doc = "X Magnetic field"]
26628    pub xmag: i16,
26629    #[doc = "Y Magnetic field"]
26630    pub ymag: i16,
26631    #[doc = "Z Magnetic field"]
26632    pub zmag: i16,
26633    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26634    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26635    pub temperature: i16,
26636}
26637impl SCALED_IMU_DATA {
26638    pub const ENCODED_LEN: usize = 24usize;
26639    pub const DEFAULT: Self = Self {
26640        time_boot_ms: 0_u32,
26641        xacc: 0_i16,
26642        yacc: 0_i16,
26643        zacc: 0_i16,
26644        xgyro: 0_i16,
26645        ygyro: 0_i16,
26646        zgyro: 0_i16,
26647        xmag: 0_i16,
26648        ymag: 0_i16,
26649        zmag: 0_i16,
26650        temperature: 0_i16,
26651    };
26652    #[cfg(feature = "arbitrary")]
26653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26654        use arbitrary::{Arbitrary, Unstructured};
26655        let mut buf = [0u8; 1024];
26656        rng.fill_bytes(&mut buf);
26657        let mut unstructured = Unstructured::new(&buf);
26658        Self::arbitrary(&mut unstructured).unwrap_or_default()
26659    }
26660}
26661impl Default for SCALED_IMU_DATA {
26662    fn default() -> Self {
26663        Self::DEFAULT.clone()
26664    }
26665}
26666impl MessageData for SCALED_IMU_DATA {
26667    type Message = MavMessage;
26668    const ID: u32 = 26u32;
26669    const NAME: &'static str = "SCALED_IMU";
26670    const EXTRA_CRC: u8 = 170u8;
26671    const ENCODED_LEN: usize = 24usize;
26672    fn deser(
26673        _version: MavlinkVersion,
26674        __input: &[u8],
26675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26676        let avail_len = __input.len();
26677        let mut payload_buf = [0; Self::ENCODED_LEN];
26678        let mut buf = if avail_len < Self::ENCODED_LEN {
26679            payload_buf[0..avail_len].copy_from_slice(__input);
26680            Bytes::new(&payload_buf)
26681        } else {
26682            Bytes::new(__input)
26683        };
26684        let mut __struct = Self::default();
26685        __struct.time_boot_ms = buf.get_u32_le();
26686        __struct.xacc = buf.get_i16_le();
26687        __struct.yacc = buf.get_i16_le();
26688        __struct.zacc = buf.get_i16_le();
26689        __struct.xgyro = buf.get_i16_le();
26690        __struct.ygyro = buf.get_i16_le();
26691        __struct.zgyro = buf.get_i16_le();
26692        __struct.xmag = buf.get_i16_le();
26693        __struct.ymag = buf.get_i16_le();
26694        __struct.zmag = buf.get_i16_le();
26695        __struct.temperature = buf.get_i16_le();
26696        Ok(__struct)
26697    }
26698    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26699        let mut __tmp = BytesMut::new(bytes);
26700        #[allow(clippy::absurd_extreme_comparisons)]
26701        #[allow(unused_comparisons)]
26702        if __tmp.remaining() < Self::ENCODED_LEN {
26703            panic!(
26704                "buffer is too small (need {} bytes, but got {})",
26705                Self::ENCODED_LEN,
26706                __tmp.remaining(),
26707            )
26708        }
26709        __tmp.put_u32_le(self.time_boot_ms);
26710        __tmp.put_i16_le(self.xacc);
26711        __tmp.put_i16_le(self.yacc);
26712        __tmp.put_i16_le(self.zacc);
26713        __tmp.put_i16_le(self.xgyro);
26714        __tmp.put_i16_le(self.ygyro);
26715        __tmp.put_i16_le(self.zgyro);
26716        __tmp.put_i16_le(self.xmag);
26717        __tmp.put_i16_le(self.ymag);
26718        __tmp.put_i16_le(self.zmag);
26719        if matches!(version, MavlinkVersion::V2) {
26720            __tmp.put_i16_le(self.temperature);
26721            let len = __tmp.len();
26722            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26723        } else {
26724            __tmp.len()
26725        }
26726    }
26727}
26728#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26729#[doc = ""]
26730#[doc = "ID: 116"]
26731#[derive(Debug, Clone, PartialEq)]
26732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26734#[cfg_attr(feature = "ts", derive(TS))]
26735#[cfg_attr(feature = "ts", ts(export))]
26736pub struct SCALED_IMU2_DATA {
26737    #[doc = "Timestamp (time since system boot)."]
26738    pub time_boot_ms: u32,
26739    #[doc = "X acceleration"]
26740    pub xacc: i16,
26741    #[doc = "Y acceleration"]
26742    pub yacc: i16,
26743    #[doc = "Z acceleration"]
26744    pub zacc: i16,
26745    #[doc = "Angular speed around X axis"]
26746    pub xgyro: i16,
26747    #[doc = "Angular speed around Y axis"]
26748    pub ygyro: i16,
26749    #[doc = "Angular speed around Z axis"]
26750    pub zgyro: i16,
26751    #[doc = "X Magnetic field"]
26752    pub xmag: i16,
26753    #[doc = "Y Magnetic field"]
26754    pub ymag: i16,
26755    #[doc = "Z Magnetic field"]
26756    pub zmag: i16,
26757    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26758    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26759    pub temperature: i16,
26760}
26761impl SCALED_IMU2_DATA {
26762    pub const ENCODED_LEN: usize = 24usize;
26763    pub const DEFAULT: Self = Self {
26764        time_boot_ms: 0_u32,
26765        xacc: 0_i16,
26766        yacc: 0_i16,
26767        zacc: 0_i16,
26768        xgyro: 0_i16,
26769        ygyro: 0_i16,
26770        zgyro: 0_i16,
26771        xmag: 0_i16,
26772        ymag: 0_i16,
26773        zmag: 0_i16,
26774        temperature: 0_i16,
26775    };
26776    #[cfg(feature = "arbitrary")]
26777    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26778        use arbitrary::{Arbitrary, Unstructured};
26779        let mut buf = [0u8; 1024];
26780        rng.fill_bytes(&mut buf);
26781        let mut unstructured = Unstructured::new(&buf);
26782        Self::arbitrary(&mut unstructured).unwrap_or_default()
26783    }
26784}
26785impl Default for SCALED_IMU2_DATA {
26786    fn default() -> Self {
26787        Self::DEFAULT.clone()
26788    }
26789}
26790impl MessageData for SCALED_IMU2_DATA {
26791    type Message = MavMessage;
26792    const ID: u32 = 116u32;
26793    const NAME: &'static str = "SCALED_IMU2";
26794    const EXTRA_CRC: u8 = 76u8;
26795    const ENCODED_LEN: usize = 24usize;
26796    fn deser(
26797        _version: MavlinkVersion,
26798        __input: &[u8],
26799    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26800        let avail_len = __input.len();
26801        let mut payload_buf = [0; Self::ENCODED_LEN];
26802        let mut buf = if avail_len < Self::ENCODED_LEN {
26803            payload_buf[0..avail_len].copy_from_slice(__input);
26804            Bytes::new(&payload_buf)
26805        } else {
26806            Bytes::new(__input)
26807        };
26808        let mut __struct = Self::default();
26809        __struct.time_boot_ms = buf.get_u32_le();
26810        __struct.xacc = buf.get_i16_le();
26811        __struct.yacc = buf.get_i16_le();
26812        __struct.zacc = buf.get_i16_le();
26813        __struct.xgyro = buf.get_i16_le();
26814        __struct.ygyro = buf.get_i16_le();
26815        __struct.zgyro = buf.get_i16_le();
26816        __struct.xmag = buf.get_i16_le();
26817        __struct.ymag = buf.get_i16_le();
26818        __struct.zmag = buf.get_i16_le();
26819        __struct.temperature = buf.get_i16_le();
26820        Ok(__struct)
26821    }
26822    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26823        let mut __tmp = BytesMut::new(bytes);
26824        #[allow(clippy::absurd_extreme_comparisons)]
26825        #[allow(unused_comparisons)]
26826        if __tmp.remaining() < Self::ENCODED_LEN {
26827            panic!(
26828                "buffer is too small (need {} bytes, but got {})",
26829                Self::ENCODED_LEN,
26830                __tmp.remaining(),
26831            )
26832        }
26833        __tmp.put_u32_le(self.time_boot_ms);
26834        __tmp.put_i16_le(self.xacc);
26835        __tmp.put_i16_le(self.yacc);
26836        __tmp.put_i16_le(self.zacc);
26837        __tmp.put_i16_le(self.xgyro);
26838        __tmp.put_i16_le(self.ygyro);
26839        __tmp.put_i16_le(self.zgyro);
26840        __tmp.put_i16_le(self.xmag);
26841        __tmp.put_i16_le(self.ymag);
26842        __tmp.put_i16_le(self.zmag);
26843        if matches!(version, MavlinkVersion::V2) {
26844            __tmp.put_i16_le(self.temperature);
26845            let len = __tmp.len();
26846            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26847        } else {
26848            __tmp.len()
26849        }
26850    }
26851}
26852#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
26853#[doc = ""]
26854#[doc = "ID: 129"]
26855#[derive(Debug, Clone, PartialEq)]
26856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26858#[cfg_attr(feature = "ts", derive(TS))]
26859#[cfg_attr(feature = "ts", ts(export))]
26860pub struct SCALED_IMU3_DATA {
26861    #[doc = "Timestamp (time since system boot)."]
26862    pub time_boot_ms: u32,
26863    #[doc = "X acceleration"]
26864    pub xacc: i16,
26865    #[doc = "Y acceleration"]
26866    pub yacc: i16,
26867    #[doc = "Z acceleration"]
26868    pub zacc: i16,
26869    #[doc = "Angular speed around X axis"]
26870    pub xgyro: i16,
26871    #[doc = "Angular speed around Y axis"]
26872    pub ygyro: i16,
26873    #[doc = "Angular speed around Z axis"]
26874    pub zgyro: i16,
26875    #[doc = "X Magnetic field"]
26876    pub xmag: i16,
26877    #[doc = "Y Magnetic field"]
26878    pub ymag: i16,
26879    #[doc = "Z Magnetic field"]
26880    pub zmag: i16,
26881    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26882    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26883    pub temperature: i16,
26884}
26885impl SCALED_IMU3_DATA {
26886    pub const ENCODED_LEN: usize = 24usize;
26887    pub const DEFAULT: Self = Self {
26888        time_boot_ms: 0_u32,
26889        xacc: 0_i16,
26890        yacc: 0_i16,
26891        zacc: 0_i16,
26892        xgyro: 0_i16,
26893        ygyro: 0_i16,
26894        zgyro: 0_i16,
26895        xmag: 0_i16,
26896        ymag: 0_i16,
26897        zmag: 0_i16,
26898        temperature: 0_i16,
26899    };
26900    #[cfg(feature = "arbitrary")]
26901    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26902        use arbitrary::{Arbitrary, Unstructured};
26903        let mut buf = [0u8; 1024];
26904        rng.fill_bytes(&mut buf);
26905        let mut unstructured = Unstructured::new(&buf);
26906        Self::arbitrary(&mut unstructured).unwrap_or_default()
26907    }
26908}
26909impl Default for SCALED_IMU3_DATA {
26910    fn default() -> Self {
26911        Self::DEFAULT.clone()
26912    }
26913}
26914impl MessageData for SCALED_IMU3_DATA {
26915    type Message = MavMessage;
26916    const ID: u32 = 129u32;
26917    const NAME: &'static str = "SCALED_IMU3";
26918    const EXTRA_CRC: u8 = 46u8;
26919    const ENCODED_LEN: usize = 24usize;
26920    fn deser(
26921        _version: MavlinkVersion,
26922        __input: &[u8],
26923    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26924        let avail_len = __input.len();
26925        let mut payload_buf = [0; Self::ENCODED_LEN];
26926        let mut buf = if avail_len < Self::ENCODED_LEN {
26927            payload_buf[0..avail_len].copy_from_slice(__input);
26928            Bytes::new(&payload_buf)
26929        } else {
26930            Bytes::new(__input)
26931        };
26932        let mut __struct = Self::default();
26933        __struct.time_boot_ms = buf.get_u32_le();
26934        __struct.xacc = buf.get_i16_le();
26935        __struct.yacc = buf.get_i16_le();
26936        __struct.zacc = buf.get_i16_le();
26937        __struct.xgyro = buf.get_i16_le();
26938        __struct.ygyro = buf.get_i16_le();
26939        __struct.zgyro = buf.get_i16_le();
26940        __struct.xmag = buf.get_i16_le();
26941        __struct.ymag = buf.get_i16_le();
26942        __struct.zmag = buf.get_i16_le();
26943        __struct.temperature = buf.get_i16_le();
26944        Ok(__struct)
26945    }
26946    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26947        let mut __tmp = BytesMut::new(bytes);
26948        #[allow(clippy::absurd_extreme_comparisons)]
26949        #[allow(unused_comparisons)]
26950        if __tmp.remaining() < Self::ENCODED_LEN {
26951            panic!(
26952                "buffer is too small (need {} bytes, but got {})",
26953                Self::ENCODED_LEN,
26954                __tmp.remaining(),
26955            )
26956        }
26957        __tmp.put_u32_le(self.time_boot_ms);
26958        __tmp.put_i16_le(self.xacc);
26959        __tmp.put_i16_le(self.yacc);
26960        __tmp.put_i16_le(self.zacc);
26961        __tmp.put_i16_le(self.xgyro);
26962        __tmp.put_i16_le(self.ygyro);
26963        __tmp.put_i16_le(self.zgyro);
26964        __tmp.put_i16_le(self.xmag);
26965        __tmp.put_i16_le(self.ymag);
26966        __tmp.put_i16_le(self.zmag);
26967        if matches!(version, MavlinkVersion::V2) {
26968            __tmp.put_i16_le(self.temperature);
26969            let len = __tmp.len();
26970            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26971        } else {
26972            __tmp.len()
26973        }
26974    }
26975}
26976#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
26977#[doc = ""]
26978#[doc = "ID: 29"]
26979#[derive(Debug, Clone, PartialEq)]
26980#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26981#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26982#[cfg_attr(feature = "ts", derive(TS))]
26983#[cfg_attr(feature = "ts", ts(export))]
26984pub struct SCALED_PRESSURE_DATA {
26985    #[doc = "Timestamp (time since system boot)."]
26986    pub time_boot_ms: u32,
26987    #[doc = "Absolute pressure"]
26988    pub press_abs: f32,
26989    #[doc = "Differential pressure 1"]
26990    pub press_diff: f32,
26991    #[doc = "Absolute pressure temperature"]
26992    pub temperature: i16,
26993    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26994    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26995    pub temperature_press_diff: i16,
26996}
26997impl SCALED_PRESSURE_DATA {
26998    pub const ENCODED_LEN: usize = 16usize;
26999    pub const DEFAULT: Self = Self {
27000        time_boot_ms: 0_u32,
27001        press_abs: 0.0_f32,
27002        press_diff: 0.0_f32,
27003        temperature: 0_i16,
27004        temperature_press_diff: 0_i16,
27005    };
27006    #[cfg(feature = "arbitrary")]
27007    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27008        use arbitrary::{Arbitrary, Unstructured};
27009        let mut buf = [0u8; 1024];
27010        rng.fill_bytes(&mut buf);
27011        let mut unstructured = Unstructured::new(&buf);
27012        Self::arbitrary(&mut unstructured).unwrap_or_default()
27013    }
27014}
27015impl Default for SCALED_PRESSURE_DATA {
27016    fn default() -> Self {
27017        Self::DEFAULT.clone()
27018    }
27019}
27020impl MessageData for SCALED_PRESSURE_DATA {
27021    type Message = MavMessage;
27022    const ID: u32 = 29u32;
27023    const NAME: &'static str = "SCALED_PRESSURE";
27024    const EXTRA_CRC: u8 = 115u8;
27025    const ENCODED_LEN: usize = 16usize;
27026    fn deser(
27027        _version: MavlinkVersion,
27028        __input: &[u8],
27029    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27030        let avail_len = __input.len();
27031        let mut payload_buf = [0; Self::ENCODED_LEN];
27032        let mut buf = if avail_len < Self::ENCODED_LEN {
27033            payload_buf[0..avail_len].copy_from_slice(__input);
27034            Bytes::new(&payload_buf)
27035        } else {
27036            Bytes::new(__input)
27037        };
27038        let mut __struct = Self::default();
27039        __struct.time_boot_ms = buf.get_u32_le();
27040        __struct.press_abs = buf.get_f32_le();
27041        __struct.press_diff = buf.get_f32_le();
27042        __struct.temperature = buf.get_i16_le();
27043        __struct.temperature_press_diff = buf.get_i16_le();
27044        Ok(__struct)
27045    }
27046    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27047        let mut __tmp = BytesMut::new(bytes);
27048        #[allow(clippy::absurd_extreme_comparisons)]
27049        #[allow(unused_comparisons)]
27050        if __tmp.remaining() < Self::ENCODED_LEN {
27051            panic!(
27052                "buffer is too small (need {} bytes, but got {})",
27053                Self::ENCODED_LEN,
27054                __tmp.remaining(),
27055            )
27056        }
27057        __tmp.put_u32_le(self.time_boot_ms);
27058        __tmp.put_f32_le(self.press_abs);
27059        __tmp.put_f32_le(self.press_diff);
27060        __tmp.put_i16_le(self.temperature);
27061        if matches!(version, MavlinkVersion::V2) {
27062            __tmp.put_i16_le(self.temperature_press_diff);
27063            let len = __tmp.len();
27064            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27065        } else {
27066            __tmp.len()
27067        }
27068    }
27069}
27070#[doc = "Barometer readings for 2nd barometer."]
27071#[doc = ""]
27072#[doc = "ID: 137"]
27073#[derive(Debug, Clone, PartialEq)]
27074#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27075#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27076#[cfg_attr(feature = "ts", derive(TS))]
27077#[cfg_attr(feature = "ts", ts(export))]
27078pub struct SCALED_PRESSURE2_DATA {
27079    #[doc = "Timestamp (time since system boot)."]
27080    pub time_boot_ms: u32,
27081    #[doc = "Absolute pressure"]
27082    pub press_abs: f32,
27083    #[doc = "Differential pressure"]
27084    pub press_diff: f32,
27085    #[doc = "Absolute pressure temperature"]
27086    pub temperature: i16,
27087    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27088    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27089    pub temperature_press_diff: i16,
27090}
27091impl SCALED_PRESSURE2_DATA {
27092    pub const ENCODED_LEN: usize = 16usize;
27093    pub const DEFAULT: Self = Self {
27094        time_boot_ms: 0_u32,
27095        press_abs: 0.0_f32,
27096        press_diff: 0.0_f32,
27097        temperature: 0_i16,
27098        temperature_press_diff: 0_i16,
27099    };
27100    #[cfg(feature = "arbitrary")]
27101    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27102        use arbitrary::{Arbitrary, Unstructured};
27103        let mut buf = [0u8; 1024];
27104        rng.fill_bytes(&mut buf);
27105        let mut unstructured = Unstructured::new(&buf);
27106        Self::arbitrary(&mut unstructured).unwrap_or_default()
27107    }
27108}
27109impl Default for SCALED_PRESSURE2_DATA {
27110    fn default() -> Self {
27111        Self::DEFAULT.clone()
27112    }
27113}
27114impl MessageData for SCALED_PRESSURE2_DATA {
27115    type Message = MavMessage;
27116    const ID: u32 = 137u32;
27117    const NAME: &'static str = "SCALED_PRESSURE2";
27118    const EXTRA_CRC: u8 = 195u8;
27119    const ENCODED_LEN: usize = 16usize;
27120    fn deser(
27121        _version: MavlinkVersion,
27122        __input: &[u8],
27123    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27124        let avail_len = __input.len();
27125        let mut payload_buf = [0; Self::ENCODED_LEN];
27126        let mut buf = if avail_len < Self::ENCODED_LEN {
27127            payload_buf[0..avail_len].copy_from_slice(__input);
27128            Bytes::new(&payload_buf)
27129        } else {
27130            Bytes::new(__input)
27131        };
27132        let mut __struct = Self::default();
27133        __struct.time_boot_ms = buf.get_u32_le();
27134        __struct.press_abs = buf.get_f32_le();
27135        __struct.press_diff = buf.get_f32_le();
27136        __struct.temperature = buf.get_i16_le();
27137        __struct.temperature_press_diff = buf.get_i16_le();
27138        Ok(__struct)
27139    }
27140    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27141        let mut __tmp = BytesMut::new(bytes);
27142        #[allow(clippy::absurd_extreme_comparisons)]
27143        #[allow(unused_comparisons)]
27144        if __tmp.remaining() < Self::ENCODED_LEN {
27145            panic!(
27146                "buffer is too small (need {} bytes, but got {})",
27147                Self::ENCODED_LEN,
27148                __tmp.remaining(),
27149            )
27150        }
27151        __tmp.put_u32_le(self.time_boot_ms);
27152        __tmp.put_f32_le(self.press_abs);
27153        __tmp.put_f32_le(self.press_diff);
27154        __tmp.put_i16_le(self.temperature);
27155        if matches!(version, MavlinkVersion::V2) {
27156            __tmp.put_i16_le(self.temperature_press_diff);
27157            let len = __tmp.len();
27158            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27159        } else {
27160            __tmp.len()
27161        }
27162    }
27163}
27164#[doc = "Barometer readings for 3rd barometer."]
27165#[doc = ""]
27166#[doc = "ID: 143"]
27167#[derive(Debug, Clone, PartialEq)]
27168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27170#[cfg_attr(feature = "ts", derive(TS))]
27171#[cfg_attr(feature = "ts", ts(export))]
27172pub struct SCALED_PRESSURE3_DATA {
27173    #[doc = "Timestamp (time since system boot)."]
27174    pub time_boot_ms: u32,
27175    #[doc = "Absolute pressure"]
27176    pub press_abs: f32,
27177    #[doc = "Differential pressure"]
27178    pub press_diff: f32,
27179    #[doc = "Absolute pressure temperature"]
27180    pub temperature: i16,
27181    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27182    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27183    pub temperature_press_diff: i16,
27184}
27185impl SCALED_PRESSURE3_DATA {
27186    pub const ENCODED_LEN: usize = 16usize;
27187    pub const DEFAULT: Self = Self {
27188        time_boot_ms: 0_u32,
27189        press_abs: 0.0_f32,
27190        press_diff: 0.0_f32,
27191        temperature: 0_i16,
27192        temperature_press_diff: 0_i16,
27193    };
27194    #[cfg(feature = "arbitrary")]
27195    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27196        use arbitrary::{Arbitrary, Unstructured};
27197        let mut buf = [0u8; 1024];
27198        rng.fill_bytes(&mut buf);
27199        let mut unstructured = Unstructured::new(&buf);
27200        Self::arbitrary(&mut unstructured).unwrap_or_default()
27201    }
27202}
27203impl Default for SCALED_PRESSURE3_DATA {
27204    fn default() -> Self {
27205        Self::DEFAULT.clone()
27206    }
27207}
27208impl MessageData for SCALED_PRESSURE3_DATA {
27209    type Message = MavMessage;
27210    const ID: u32 = 143u32;
27211    const NAME: &'static str = "SCALED_PRESSURE3";
27212    const EXTRA_CRC: u8 = 131u8;
27213    const ENCODED_LEN: usize = 16usize;
27214    fn deser(
27215        _version: MavlinkVersion,
27216        __input: &[u8],
27217    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27218        let avail_len = __input.len();
27219        let mut payload_buf = [0; Self::ENCODED_LEN];
27220        let mut buf = if avail_len < Self::ENCODED_LEN {
27221            payload_buf[0..avail_len].copy_from_slice(__input);
27222            Bytes::new(&payload_buf)
27223        } else {
27224            Bytes::new(__input)
27225        };
27226        let mut __struct = Self::default();
27227        __struct.time_boot_ms = buf.get_u32_le();
27228        __struct.press_abs = buf.get_f32_le();
27229        __struct.press_diff = buf.get_f32_le();
27230        __struct.temperature = buf.get_i16_le();
27231        __struct.temperature_press_diff = buf.get_i16_le();
27232        Ok(__struct)
27233    }
27234    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27235        let mut __tmp = BytesMut::new(bytes);
27236        #[allow(clippy::absurd_extreme_comparisons)]
27237        #[allow(unused_comparisons)]
27238        if __tmp.remaining() < Self::ENCODED_LEN {
27239            panic!(
27240                "buffer is too small (need {} bytes, but got {})",
27241                Self::ENCODED_LEN,
27242                __tmp.remaining(),
27243            )
27244        }
27245        __tmp.put_u32_le(self.time_boot_ms);
27246        __tmp.put_f32_le(self.press_abs);
27247        __tmp.put_f32_le(self.press_diff);
27248        __tmp.put_i16_le(self.temperature);
27249        if matches!(version, MavlinkVersion::V2) {
27250            __tmp.put_i16_le(self.temperature_press_diff);
27251            let len = __tmp.len();
27252            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27253        } else {
27254            __tmp.len()
27255        }
27256    }
27257}
27258#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27259#[doc = ""]
27260#[doc = "ID: 126"]
27261#[derive(Debug, Clone, PartialEq)]
27262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27264#[cfg_attr(feature = "ts", derive(TS))]
27265#[cfg_attr(feature = "ts", ts(export))]
27266pub struct SERIAL_CONTROL_DATA {
27267    #[doc = "Baudrate of transfer. Zero means no change."]
27268    pub baudrate: u32,
27269    #[doc = "Timeout for reply data"]
27270    pub timeout: u16,
27271    #[doc = "Serial control device type."]
27272    pub device: SerialControlDev,
27273    #[doc = "Bitmap of serial control flags."]
27274    pub flags: SerialControlFlag,
27275    #[doc = "how many bytes in this transfer"]
27276    pub count: u8,
27277    #[doc = "serial data"]
27278    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27279    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27280    pub data: [u8; 70],
27281    #[doc = "System ID"]
27282    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27283    pub target_system: u8,
27284    #[doc = "Component ID"]
27285    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27286    pub target_component: u8,
27287}
27288impl SERIAL_CONTROL_DATA {
27289    pub const ENCODED_LEN: usize = 81usize;
27290    pub const DEFAULT: Self = Self {
27291        baudrate: 0_u32,
27292        timeout: 0_u16,
27293        device: SerialControlDev::DEFAULT,
27294        flags: SerialControlFlag::DEFAULT,
27295        count: 0_u8,
27296        data: [0_u8; 70usize],
27297        target_system: 0_u8,
27298        target_component: 0_u8,
27299    };
27300    #[cfg(feature = "arbitrary")]
27301    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27302        use arbitrary::{Arbitrary, Unstructured};
27303        let mut buf = [0u8; 1024];
27304        rng.fill_bytes(&mut buf);
27305        let mut unstructured = Unstructured::new(&buf);
27306        Self::arbitrary(&mut unstructured).unwrap_or_default()
27307    }
27308}
27309impl Default for SERIAL_CONTROL_DATA {
27310    fn default() -> Self {
27311        Self::DEFAULT.clone()
27312    }
27313}
27314impl MessageData for SERIAL_CONTROL_DATA {
27315    type Message = MavMessage;
27316    const ID: u32 = 126u32;
27317    const NAME: &'static str = "SERIAL_CONTROL";
27318    const EXTRA_CRC: u8 = 220u8;
27319    const ENCODED_LEN: usize = 81usize;
27320    fn deser(
27321        _version: MavlinkVersion,
27322        __input: &[u8],
27323    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27324        let avail_len = __input.len();
27325        let mut payload_buf = [0; Self::ENCODED_LEN];
27326        let mut buf = if avail_len < Self::ENCODED_LEN {
27327            payload_buf[0..avail_len].copy_from_slice(__input);
27328            Bytes::new(&payload_buf)
27329        } else {
27330            Bytes::new(__input)
27331        };
27332        let mut __struct = Self::default();
27333        __struct.baudrate = buf.get_u32_le();
27334        __struct.timeout = buf.get_u16_le();
27335        let tmp = buf.get_u8();
27336        __struct.device =
27337            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27338                enum_type: "SerialControlDev",
27339                value: tmp as u64,
27340            })?;
27341        let tmp = buf.get_u8();
27342        __struct.flags = SerialControlFlag::from_bits(tmp as <SerialControlFlag as Flags>::Bits)
27343            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27344                flag_type: "SerialControlFlag",
27345                value: tmp as u64,
27346            })?;
27347        __struct.count = buf.get_u8();
27348        for v in &mut __struct.data {
27349            let val = buf.get_u8();
27350            *v = val;
27351        }
27352        __struct.target_system = buf.get_u8();
27353        __struct.target_component = buf.get_u8();
27354        Ok(__struct)
27355    }
27356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27357        let mut __tmp = BytesMut::new(bytes);
27358        #[allow(clippy::absurd_extreme_comparisons)]
27359        #[allow(unused_comparisons)]
27360        if __tmp.remaining() < Self::ENCODED_LEN {
27361            panic!(
27362                "buffer is too small (need {} bytes, but got {})",
27363                Self::ENCODED_LEN,
27364                __tmp.remaining(),
27365            )
27366        }
27367        __tmp.put_u32_le(self.baudrate);
27368        __tmp.put_u16_le(self.timeout);
27369        __tmp.put_u8(self.device as u8);
27370        __tmp.put_u8(self.flags.bits() as u8);
27371        __tmp.put_u8(self.count);
27372        for val in &self.data {
27373            __tmp.put_u8(*val);
27374        }
27375        if matches!(version, MavlinkVersion::V2) {
27376            __tmp.put_u8(self.target_system);
27377            __tmp.put_u8(self.target_component);
27378            let len = __tmp.len();
27379            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27380        } else {
27381            __tmp.len()
27382        }
27383    }
27384}
27385#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27386#[doc = ""]
27387#[doc = "ID: 36"]
27388#[derive(Debug, Clone, PartialEq)]
27389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27390#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27391#[cfg_attr(feature = "ts", derive(TS))]
27392#[cfg_attr(feature = "ts", ts(export))]
27393pub struct SERVO_OUTPUT_RAW_DATA {
27394    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27395    pub time_usec: u32,
27396    #[doc = "Servo output 1 value"]
27397    pub servo1_raw: u16,
27398    #[doc = "Servo output 2 value"]
27399    pub servo2_raw: u16,
27400    #[doc = "Servo output 3 value"]
27401    pub servo3_raw: u16,
27402    #[doc = "Servo output 4 value"]
27403    pub servo4_raw: u16,
27404    #[doc = "Servo output 5 value"]
27405    pub servo5_raw: u16,
27406    #[doc = "Servo output 6 value"]
27407    pub servo6_raw: u16,
27408    #[doc = "Servo output 7 value"]
27409    pub servo7_raw: u16,
27410    #[doc = "Servo output 8 value"]
27411    pub servo8_raw: u16,
27412    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27413    pub port: u8,
27414    #[doc = "Servo output 9 value"]
27415    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27416    pub servo9_raw: u16,
27417    #[doc = "Servo output 10 value"]
27418    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27419    pub servo10_raw: u16,
27420    #[doc = "Servo output 11 value"]
27421    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27422    pub servo11_raw: u16,
27423    #[doc = "Servo output 12 value"]
27424    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27425    pub servo12_raw: u16,
27426    #[doc = "Servo output 13 value"]
27427    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27428    pub servo13_raw: u16,
27429    #[doc = "Servo output 14 value"]
27430    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27431    pub servo14_raw: u16,
27432    #[doc = "Servo output 15 value"]
27433    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27434    pub servo15_raw: u16,
27435    #[doc = "Servo output 16 value"]
27436    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27437    pub servo16_raw: u16,
27438}
27439impl SERVO_OUTPUT_RAW_DATA {
27440    pub const ENCODED_LEN: usize = 37usize;
27441    pub const DEFAULT: Self = Self {
27442        time_usec: 0_u32,
27443        servo1_raw: 0_u16,
27444        servo2_raw: 0_u16,
27445        servo3_raw: 0_u16,
27446        servo4_raw: 0_u16,
27447        servo5_raw: 0_u16,
27448        servo6_raw: 0_u16,
27449        servo7_raw: 0_u16,
27450        servo8_raw: 0_u16,
27451        port: 0_u8,
27452        servo9_raw: 0_u16,
27453        servo10_raw: 0_u16,
27454        servo11_raw: 0_u16,
27455        servo12_raw: 0_u16,
27456        servo13_raw: 0_u16,
27457        servo14_raw: 0_u16,
27458        servo15_raw: 0_u16,
27459        servo16_raw: 0_u16,
27460    };
27461    #[cfg(feature = "arbitrary")]
27462    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27463        use arbitrary::{Arbitrary, Unstructured};
27464        let mut buf = [0u8; 1024];
27465        rng.fill_bytes(&mut buf);
27466        let mut unstructured = Unstructured::new(&buf);
27467        Self::arbitrary(&mut unstructured).unwrap_or_default()
27468    }
27469}
27470impl Default for SERVO_OUTPUT_RAW_DATA {
27471    fn default() -> Self {
27472        Self::DEFAULT.clone()
27473    }
27474}
27475impl MessageData for SERVO_OUTPUT_RAW_DATA {
27476    type Message = MavMessage;
27477    const ID: u32 = 36u32;
27478    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27479    const EXTRA_CRC: u8 = 222u8;
27480    const ENCODED_LEN: usize = 37usize;
27481    fn deser(
27482        _version: MavlinkVersion,
27483        __input: &[u8],
27484    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27485        let avail_len = __input.len();
27486        let mut payload_buf = [0; Self::ENCODED_LEN];
27487        let mut buf = if avail_len < Self::ENCODED_LEN {
27488            payload_buf[0..avail_len].copy_from_slice(__input);
27489            Bytes::new(&payload_buf)
27490        } else {
27491            Bytes::new(__input)
27492        };
27493        let mut __struct = Self::default();
27494        __struct.time_usec = buf.get_u32_le();
27495        __struct.servo1_raw = buf.get_u16_le();
27496        __struct.servo2_raw = buf.get_u16_le();
27497        __struct.servo3_raw = buf.get_u16_le();
27498        __struct.servo4_raw = buf.get_u16_le();
27499        __struct.servo5_raw = buf.get_u16_le();
27500        __struct.servo6_raw = buf.get_u16_le();
27501        __struct.servo7_raw = buf.get_u16_le();
27502        __struct.servo8_raw = buf.get_u16_le();
27503        __struct.port = buf.get_u8();
27504        __struct.servo9_raw = buf.get_u16_le();
27505        __struct.servo10_raw = buf.get_u16_le();
27506        __struct.servo11_raw = buf.get_u16_le();
27507        __struct.servo12_raw = buf.get_u16_le();
27508        __struct.servo13_raw = buf.get_u16_le();
27509        __struct.servo14_raw = buf.get_u16_le();
27510        __struct.servo15_raw = buf.get_u16_le();
27511        __struct.servo16_raw = buf.get_u16_le();
27512        Ok(__struct)
27513    }
27514    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27515        let mut __tmp = BytesMut::new(bytes);
27516        #[allow(clippy::absurd_extreme_comparisons)]
27517        #[allow(unused_comparisons)]
27518        if __tmp.remaining() < Self::ENCODED_LEN {
27519            panic!(
27520                "buffer is too small (need {} bytes, but got {})",
27521                Self::ENCODED_LEN,
27522                __tmp.remaining(),
27523            )
27524        }
27525        __tmp.put_u32_le(self.time_usec);
27526        __tmp.put_u16_le(self.servo1_raw);
27527        __tmp.put_u16_le(self.servo2_raw);
27528        __tmp.put_u16_le(self.servo3_raw);
27529        __tmp.put_u16_le(self.servo4_raw);
27530        __tmp.put_u16_le(self.servo5_raw);
27531        __tmp.put_u16_le(self.servo6_raw);
27532        __tmp.put_u16_le(self.servo7_raw);
27533        __tmp.put_u16_le(self.servo8_raw);
27534        __tmp.put_u8(self.port);
27535        if matches!(version, MavlinkVersion::V2) {
27536            __tmp.put_u16_le(self.servo9_raw);
27537            __tmp.put_u16_le(self.servo10_raw);
27538            __tmp.put_u16_le(self.servo11_raw);
27539            __tmp.put_u16_le(self.servo12_raw);
27540            __tmp.put_u16_le(self.servo13_raw);
27541            __tmp.put_u16_le(self.servo14_raw);
27542            __tmp.put_u16_le(self.servo15_raw);
27543            __tmp.put_u16_le(self.servo16_raw);
27544            let len = __tmp.len();
27545            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27546        } else {
27547            __tmp.len()
27548        }
27549    }
27550}
27551#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27552#[doc = ""]
27553#[doc = "ID: 256"]
27554#[derive(Debug, Clone, PartialEq)]
27555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27556#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27557#[cfg_attr(feature = "ts", derive(TS))]
27558#[cfg_attr(feature = "ts", ts(export))]
27559pub struct SETUP_SIGNING_DATA {
27560    #[doc = "initial timestamp"]
27561    pub initial_timestamp: u64,
27562    #[doc = "system id of the target"]
27563    pub target_system: u8,
27564    #[doc = "component ID of the target"]
27565    pub target_component: u8,
27566    #[doc = "signing key"]
27567    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27568    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27569    pub secret_key: [u8; 32],
27570}
27571impl SETUP_SIGNING_DATA {
27572    pub const ENCODED_LEN: usize = 42usize;
27573    pub const DEFAULT: Self = Self {
27574        initial_timestamp: 0_u64,
27575        target_system: 0_u8,
27576        target_component: 0_u8,
27577        secret_key: [0_u8; 32usize],
27578    };
27579    #[cfg(feature = "arbitrary")]
27580    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27581        use arbitrary::{Arbitrary, Unstructured};
27582        let mut buf = [0u8; 1024];
27583        rng.fill_bytes(&mut buf);
27584        let mut unstructured = Unstructured::new(&buf);
27585        Self::arbitrary(&mut unstructured).unwrap_or_default()
27586    }
27587}
27588impl Default for SETUP_SIGNING_DATA {
27589    fn default() -> Self {
27590        Self::DEFAULT.clone()
27591    }
27592}
27593impl MessageData for SETUP_SIGNING_DATA {
27594    type Message = MavMessage;
27595    const ID: u32 = 256u32;
27596    const NAME: &'static str = "SETUP_SIGNING";
27597    const EXTRA_CRC: u8 = 71u8;
27598    const ENCODED_LEN: usize = 42usize;
27599    fn deser(
27600        _version: MavlinkVersion,
27601        __input: &[u8],
27602    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27603        let avail_len = __input.len();
27604        let mut payload_buf = [0; Self::ENCODED_LEN];
27605        let mut buf = if avail_len < Self::ENCODED_LEN {
27606            payload_buf[0..avail_len].copy_from_slice(__input);
27607            Bytes::new(&payload_buf)
27608        } else {
27609            Bytes::new(__input)
27610        };
27611        let mut __struct = Self::default();
27612        __struct.initial_timestamp = buf.get_u64_le();
27613        __struct.target_system = buf.get_u8();
27614        __struct.target_component = buf.get_u8();
27615        for v in &mut __struct.secret_key {
27616            let val = buf.get_u8();
27617            *v = val;
27618        }
27619        Ok(__struct)
27620    }
27621    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27622        let mut __tmp = BytesMut::new(bytes);
27623        #[allow(clippy::absurd_extreme_comparisons)]
27624        #[allow(unused_comparisons)]
27625        if __tmp.remaining() < Self::ENCODED_LEN {
27626            panic!(
27627                "buffer is too small (need {} bytes, but got {})",
27628                Self::ENCODED_LEN,
27629                __tmp.remaining(),
27630            )
27631        }
27632        __tmp.put_u64_le(self.initial_timestamp);
27633        __tmp.put_u8(self.target_system);
27634        __tmp.put_u8(self.target_component);
27635        for val in &self.secret_key {
27636            __tmp.put_u8(*val);
27637        }
27638        if matches!(version, MavlinkVersion::V2) {
27639            let len = __tmp.len();
27640            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27641        } else {
27642            __tmp.len()
27643        }
27644    }
27645}
27646#[doc = "Set the vehicle attitude and body angular rates."]
27647#[doc = ""]
27648#[doc = "ID: 139"]
27649#[derive(Debug, Clone, PartialEq)]
27650#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27652#[cfg_attr(feature = "ts", derive(TS))]
27653#[cfg_attr(feature = "ts", ts(export))]
27654pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27655    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27656    pub time_usec: u64,
27657    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27658    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27659    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27660    pub controls: [f32; 8],
27661    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27662    pub group_mlx: u8,
27663    #[doc = "System ID"]
27664    pub target_system: u8,
27665    #[doc = "Component ID"]
27666    pub target_component: u8,
27667}
27668impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27669    pub const ENCODED_LEN: usize = 43usize;
27670    pub const DEFAULT: Self = Self {
27671        time_usec: 0_u64,
27672        controls: [0.0_f32; 8usize],
27673        group_mlx: 0_u8,
27674        target_system: 0_u8,
27675        target_component: 0_u8,
27676    };
27677    #[cfg(feature = "arbitrary")]
27678    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27679        use arbitrary::{Arbitrary, Unstructured};
27680        let mut buf = [0u8; 1024];
27681        rng.fill_bytes(&mut buf);
27682        let mut unstructured = Unstructured::new(&buf);
27683        Self::arbitrary(&mut unstructured).unwrap_or_default()
27684    }
27685}
27686impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27687    fn default() -> Self {
27688        Self::DEFAULT.clone()
27689    }
27690}
27691impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27692    type Message = MavMessage;
27693    const ID: u32 = 139u32;
27694    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27695    const EXTRA_CRC: u8 = 168u8;
27696    const ENCODED_LEN: usize = 43usize;
27697    fn deser(
27698        _version: MavlinkVersion,
27699        __input: &[u8],
27700    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27701        let avail_len = __input.len();
27702        let mut payload_buf = [0; Self::ENCODED_LEN];
27703        let mut buf = if avail_len < Self::ENCODED_LEN {
27704            payload_buf[0..avail_len].copy_from_slice(__input);
27705            Bytes::new(&payload_buf)
27706        } else {
27707            Bytes::new(__input)
27708        };
27709        let mut __struct = Self::default();
27710        __struct.time_usec = buf.get_u64_le();
27711        for v in &mut __struct.controls {
27712            let val = buf.get_f32_le();
27713            *v = val;
27714        }
27715        __struct.group_mlx = buf.get_u8();
27716        __struct.target_system = buf.get_u8();
27717        __struct.target_component = buf.get_u8();
27718        Ok(__struct)
27719    }
27720    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27721        let mut __tmp = BytesMut::new(bytes);
27722        #[allow(clippy::absurd_extreme_comparisons)]
27723        #[allow(unused_comparisons)]
27724        if __tmp.remaining() < Self::ENCODED_LEN {
27725            panic!(
27726                "buffer is too small (need {} bytes, but got {})",
27727                Self::ENCODED_LEN,
27728                __tmp.remaining(),
27729            )
27730        }
27731        __tmp.put_u64_le(self.time_usec);
27732        for val in &self.controls {
27733            __tmp.put_f32_le(*val);
27734        }
27735        __tmp.put_u8(self.group_mlx);
27736        __tmp.put_u8(self.target_system);
27737        __tmp.put_u8(self.target_component);
27738        if matches!(version, MavlinkVersion::V2) {
27739            let len = __tmp.len();
27740            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27741        } else {
27742            __tmp.len()
27743        }
27744    }
27745}
27746#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
27747#[doc = ""]
27748#[doc = "ID: 82"]
27749#[derive(Debug, Clone, PartialEq)]
27750#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27751#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27752#[cfg_attr(feature = "ts", derive(TS))]
27753#[cfg_attr(feature = "ts", ts(export))]
27754pub struct SET_ATTITUDE_TARGET_DATA {
27755    #[doc = "Timestamp (time since system boot)."]
27756    pub time_boot_ms: u32,
27757    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
27758    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27759    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27760    pub q: [f32; 4],
27761    #[doc = "Body roll rate"]
27762    pub body_roll_rate: f32,
27763    #[doc = "Body pitch rate"]
27764    pub body_pitch_rate: f32,
27765    #[doc = "Body yaw rate"]
27766    pub body_yaw_rate: f32,
27767    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
27768    pub thrust: f32,
27769    #[doc = "System ID"]
27770    pub target_system: u8,
27771    #[doc = "Component ID"]
27772    pub target_component: u8,
27773    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27774    pub type_mask: AttitudeTargetTypemask,
27775    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
27776    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27777    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27778    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27779    pub thrust_body: [f32; 3],
27780}
27781impl SET_ATTITUDE_TARGET_DATA {
27782    pub const ENCODED_LEN: usize = 51usize;
27783    pub const DEFAULT: Self = Self {
27784        time_boot_ms: 0_u32,
27785        q: [0.0_f32; 4usize],
27786        body_roll_rate: 0.0_f32,
27787        body_pitch_rate: 0.0_f32,
27788        body_yaw_rate: 0.0_f32,
27789        thrust: 0.0_f32,
27790        target_system: 0_u8,
27791        target_component: 0_u8,
27792        type_mask: AttitudeTargetTypemask::DEFAULT,
27793        thrust_body: [0.0_f32; 3usize],
27794    };
27795    #[cfg(feature = "arbitrary")]
27796    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27797        use arbitrary::{Arbitrary, Unstructured};
27798        let mut buf = [0u8; 1024];
27799        rng.fill_bytes(&mut buf);
27800        let mut unstructured = Unstructured::new(&buf);
27801        Self::arbitrary(&mut unstructured).unwrap_or_default()
27802    }
27803}
27804impl Default for SET_ATTITUDE_TARGET_DATA {
27805    fn default() -> Self {
27806        Self::DEFAULT.clone()
27807    }
27808}
27809impl MessageData for SET_ATTITUDE_TARGET_DATA {
27810    type Message = MavMessage;
27811    const ID: u32 = 82u32;
27812    const NAME: &'static str = "SET_ATTITUDE_TARGET";
27813    const EXTRA_CRC: u8 = 49u8;
27814    const ENCODED_LEN: usize = 51usize;
27815    fn deser(
27816        _version: MavlinkVersion,
27817        __input: &[u8],
27818    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27819        let avail_len = __input.len();
27820        let mut payload_buf = [0; Self::ENCODED_LEN];
27821        let mut buf = if avail_len < Self::ENCODED_LEN {
27822            payload_buf[0..avail_len].copy_from_slice(__input);
27823            Bytes::new(&payload_buf)
27824        } else {
27825            Bytes::new(__input)
27826        };
27827        let mut __struct = Self::default();
27828        __struct.time_boot_ms = buf.get_u32_le();
27829        for v in &mut __struct.q {
27830            let val = buf.get_f32_le();
27831            *v = val;
27832        }
27833        __struct.body_roll_rate = buf.get_f32_le();
27834        __struct.body_pitch_rate = buf.get_f32_le();
27835        __struct.body_yaw_rate = buf.get_f32_le();
27836        __struct.thrust = buf.get_f32_le();
27837        __struct.target_system = buf.get_u8();
27838        __struct.target_component = buf.get_u8();
27839        let tmp = buf.get_u8();
27840        __struct.type_mask =
27841            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
27842                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27843                    flag_type: "AttitudeTargetTypemask",
27844                    value: tmp as u64,
27845                })?;
27846        for v in &mut __struct.thrust_body {
27847            let val = buf.get_f32_le();
27848            *v = val;
27849        }
27850        Ok(__struct)
27851    }
27852    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27853        let mut __tmp = BytesMut::new(bytes);
27854        #[allow(clippy::absurd_extreme_comparisons)]
27855        #[allow(unused_comparisons)]
27856        if __tmp.remaining() < Self::ENCODED_LEN {
27857            panic!(
27858                "buffer is too small (need {} bytes, but got {})",
27859                Self::ENCODED_LEN,
27860                __tmp.remaining(),
27861            )
27862        }
27863        __tmp.put_u32_le(self.time_boot_ms);
27864        for val in &self.q {
27865            __tmp.put_f32_le(*val);
27866        }
27867        __tmp.put_f32_le(self.body_roll_rate);
27868        __tmp.put_f32_le(self.body_pitch_rate);
27869        __tmp.put_f32_le(self.body_yaw_rate);
27870        __tmp.put_f32_le(self.thrust);
27871        __tmp.put_u8(self.target_system);
27872        __tmp.put_u8(self.target_component);
27873        __tmp.put_u8(self.type_mask.bits() as u8);
27874        if matches!(version, MavlinkVersion::V2) {
27875            for val in &self.thrust_body {
27876                __tmp.put_f32_le(*val);
27877            }
27878            let len = __tmp.len();
27879            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27880        } else {
27881            __tmp.len()
27882        }
27883    }
27884}
27885#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
27886#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
27887#[doc = ""]
27888#[doc = "ID: 48"]
27889#[derive(Debug, Clone, PartialEq)]
27890#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27891#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27892#[cfg_attr(feature = "ts", derive(TS))]
27893#[cfg_attr(feature = "ts", ts(export))]
27894pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
27895    #[doc = "Latitude (WGS84)"]
27896    pub latitude: i32,
27897    #[doc = "Longitude (WGS84)"]
27898    pub longitude: i32,
27899    #[doc = "Altitude (MSL). Positive for up."]
27900    pub altitude: i32,
27901    #[doc = "System ID"]
27902    pub target_system: u8,
27903    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27904    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27905    pub time_usec: u64,
27906}
27907impl SET_GPS_GLOBAL_ORIGIN_DATA {
27908    pub const ENCODED_LEN: usize = 21usize;
27909    pub const DEFAULT: Self = Self {
27910        latitude: 0_i32,
27911        longitude: 0_i32,
27912        altitude: 0_i32,
27913        target_system: 0_u8,
27914        time_usec: 0_u64,
27915    };
27916    #[cfg(feature = "arbitrary")]
27917    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27918        use arbitrary::{Arbitrary, Unstructured};
27919        let mut buf = [0u8; 1024];
27920        rng.fill_bytes(&mut buf);
27921        let mut unstructured = Unstructured::new(&buf);
27922        Self::arbitrary(&mut unstructured).unwrap_or_default()
27923    }
27924}
27925impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
27926    fn default() -> Self {
27927        Self::DEFAULT.clone()
27928    }
27929}
27930impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
27931    type Message = MavMessage;
27932    const ID: u32 = 48u32;
27933    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
27934    const EXTRA_CRC: u8 = 41u8;
27935    const ENCODED_LEN: usize = 21usize;
27936    fn deser(
27937        _version: MavlinkVersion,
27938        __input: &[u8],
27939    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27940        let avail_len = __input.len();
27941        let mut payload_buf = [0; Self::ENCODED_LEN];
27942        let mut buf = if avail_len < Self::ENCODED_LEN {
27943            payload_buf[0..avail_len].copy_from_slice(__input);
27944            Bytes::new(&payload_buf)
27945        } else {
27946            Bytes::new(__input)
27947        };
27948        let mut __struct = Self::default();
27949        __struct.latitude = buf.get_i32_le();
27950        __struct.longitude = buf.get_i32_le();
27951        __struct.altitude = buf.get_i32_le();
27952        __struct.target_system = buf.get_u8();
27953        __struct.time_usec = buf.get_u64_le();
27954        Ok(__struct)
27955    }
27956    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27957        let mut __tmp = BytesMut::new(bytes);
27958        #[allow(clippy::absurd_extreme_comparisons)]
27959        #[allow(unused_comparisons)]
27960        if __tmp.remaining() < Self::ENCODED_LEN {
27961            panic!(
27962                "buffer is too small (need {} bytes, but got {})",
27963                Self::ENCODED_LEN,
27964                __tmp.remaining(),
27965            )
27966        }
27967        __tmp.put_i32_le(self.latitude);
27968        __tmp.put_i32_le(self.longitude);
27969        __tmp.put_i32_le(self.altitude);
27970        __tmp.put_u8(self.target_system);
27971        if matches!(version, MavlinkVersion::V2) {
27972            __tmp.put_u64_le(self.time_usec);
27973            let len = __tmp.len();
27974            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27975        } else {
27976            __tmp.len()
27977        }
27978    }
27979}
27980#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
27981#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
27982#[doc = ""]
27983#[doc = "ID: 243"]
27984#[derive(Debug, Clone, PartialEq)]
27985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27987#[cfg_attr(feature = "ts", derive(TS))]
27988#[cfg_attr(feature = "ts", ts(export))]
27989pub struct SET_HOME_POSITION_DATA {
27990    #[doc = "Latitude (WGS84)"]
27991    pub latitude: i32,
27992    #[doc = "Longitude (WGS84)"]
27993    pub longitude: i32,
27994    #[doc = "Altitude (MSL). Positive for up."]
27995    pub altitude: i32,
27996    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
27997    pub x: f32,
27998    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
27999    pub y: f32,
28000    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28001    pub z: f32,
28002    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28003    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28004    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28005    pub q: [f32; 4],
28006    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28007    pub approach_x: f32,
28008    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28009    pub approach_y: f32,
28010    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28011    pub approach_z: f32,
28012    #[doc = "System ID."]
28013    pub target_system: u8,
28014    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28015    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28016    pub time_usec: u64,
28017}
28018impl SET_HOME_POSITION_DATA {
28019    pub const ENCODED_LEN: usize = 61usize;
28020    pub const DEFAULT: Self = Self {
28021        latitude: 0_i32,
28022        longitude: 0_i32,
28023        altitude: 0_i32,
28024        x: 0.0_f32,
28025        y: 0.0_f32,
28026        z: 0.0_f32,
28027        q: [0.0_f32; 4usize],
28028        approach_x: 0.0_f32,
28029        approach_y: 0.0_f32,
28030        approach_z: 0.0_f32,
28031        target_system: 0_u8,
28032        time_usec: 0_u64,
28033    };
28034    #[cfg(feature = "arbitrary")]
28035    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28036        use arbitrary::{Arbitrary, Unstructured};
28037        let mut buf = [0u8; 1024];
28038        rng.fill_bytes(&mut buf);
28039        let mut unstructured = Unstructured::new(&buf);
28040        Self::arbitrary(&mut unstructured).unwrap_or_default()
28041    }
28042}
28043impl Default for SET_HOME_POSITION_DATA {
28044    fn default() -> Self {
28045        Self::DEFAULT.clone()
28046    }
28047}
28048impl MessageData for SET_HOME_POSITION_DATA {
28049    type Message = MavMessage;
28050    const ID: u32 = 243u32;
28051    const NAME: &'static str = "SET_HOME_POSITION";
28052    const EXTRA_CRC: u8 = 85u8;
28053    const ENCODED_LEN: usize = 61usize;
28054    fn deser(
28055        _version: MavlinkVersion,
28056        __input: &[u8],
28057    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28058        let avail_len = __input.len();
28059        let mut payload_buf = [0; Self::ENCODED_LEN];
28060        let mut buf = if avail_len < Self::ENCODED_LEN {
28061            payload_buf[0..avail_len].copy_from_slice(__input);
28062            Bytes::new(&payload_buf)
28063        } else {
28064            Bytes::new(__input)
28065        };
28066        let mut __struct = Self::default();
28067        __struct.latitude = buf.get_i32_le();
28068        __struct.longitude = buf.get_i32_le();
28069        __struct.altitude = buf.get_i32_le();
28070        __struct.x = buf.get_f32_le();
28071        __struct.y = buf.get_f32_le();
28072        __struct.z = buf.get_f32_le();
28073        for v in &mut __struct.q {
28074            let val = buf.get_f32_le();
28075            *v = val;
28076        }
28077        __struct.approach_x = buf.get_f32_le();
28078        __struct.approach_y = buf.get_f32_le();
28079        __struct.approach_z = buf.get_f32_le();
28080        __struct.target_system = buf.get_u8();
28081        __struct.time_usec = buf.get_u64_le();
28082        Ok(__struct)
28083    }
28084    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28085        let mut __tmp = BytesMut::new(bytes);
28086        #[allow(clippy::absurd_extreme_comparisons)]
28087        #[allow(unused_comparisons)]
28088        if __tmp.remaining() < Self::ENCODED_LEN {
28089            panic!(
28090                "buffer is too small (need {} bytes, but got {})",
28091                Self::ENCODED_LEN,
28092                __tmp.remaining(),
28093            )
28094        }
28095        __tmp.put_i32_le(self.latitude);
28096        __tmp.put_i32_le(self.longitude);
28097        __tmp.put_i32_le(self.altitude);
28098        __tmp.put_f32_le(self.x);
28099        __tmp.put_f32_le(self.y);
28100        __tmp.put_f32_le(self.z);
28101        for val in &self.q {
28102            __tmp.put_f32_le(*val);
28103        }
28104        __tmp.put_f32_le(self.approach_x);
28105        __tmp.put_f32_le(self.approach_y);
28106        __tmp.put_f32_le(self.approach_z);
28107        __tmp.put_u8(self.target_system);
28108        if matches!(version, MavlinkVersion::V2) {
28109            __tmp.put_u64_le(self.time_usec);
28110            let len = __tmp.len();
28111            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28112        } else {
28113            __tmp.len()
28114        }
28115    }
28116}
28117#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28118#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28119#[doc = ""]
28120#[doc = "ID: 11"]
28121#[derive(Debug, Clone, PartialEq)]
28122#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28123#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28124#[cfg_attr(feature = "ts", derive(TS))]
28125#[cfg_attr(feature = "ts", ts(export))]
28126pub struct SET_MODE_DATA {
28127    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28128    pub custom_mode: u32,
28129    #[doc = "The system setting the mode"]
28130    pub target_system: u8,
28131    #[doc = "The new base mode."]
28132    pub base_mode: MavMode,
28133}
28134impl SET_MODE_DATA {
28135    pub const ENCODED_LEN: usize = 6usize;
28136    pub const DEFAULT: Self = Self {
28137        custom_mode: 0_u32,
28138        target_system: 0_u8,
28139        base_mode: MavMode::DEFAULT,
28140    };
28141    #[cfg(feature = "arbitrary")]
28142    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28143        use arbitrary::{Arbitrary, Unstructured};
28144        let mut buf = [0u8; 1024];
28145        rng.fill_bytes(&mut buf);
28146        let mut unstructured = Unstructured::new(&buf);
28147        Self::arbitrary(&mut unstructured).unwrap_or_default()
28148    }
28149}
28150impl Default for SET_MODE_DATA {
28151    fn default() -> Self {
28152        Self::DEFAULT.clone()
28153    }
28154}
28155impl MessageData for SET_MODE_DATA {
28156    type Message = MavMessage;
28157    const ID: u32 = 11u32;
28158    const NAME: &'static str = "SET_MODE";
28159    const EXTRA_CRC: u8 = 89u8;
28160    const ENCODED_LEN: usize = 6usize;
28161    fn deser(
28162        _version: MavlinkVersion,
28163        __input: &[u8],
28164    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28165        let avail_len = __input.len();
28166        let mut payload_buf = [0; Self::ENCODED_LEN];
28167        let mut buf = if avail_len < Self::ENCODED_LEN {
28168            payload_buf[0..avail_len].copy_from_slice(__input);
28169            Bytes::new(&payload_buf)
28170        } else {
28171            Bytes::new(__input)
28172        };
28173        let mut __struct = Self::default();
28174        __struct.custom_mode = buf.get_u32_le();
28175        __struct.target_system = buf.get_u8();
28176        let tmp = buf.get_u8();
28177        __struct.base_mode =
28178            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28179                enum_type: "MavMode",
28180                value: tmp as u64,
28181            })?;
28182        Ok(__struct)
28183    }
28184    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28185        let mut __tmp = BytesMut::new(bytes);
28186        #[allow(clippy::absurd_extreme_comparisons)]
28187        #[allow(unused_comparisons)]
28188        if __tmp.remaining() < Self::ENCODED_LEN {
28189            panic!(
28190                "buffer is too small (need {} bytes, but got {})",
28191                Self::ENCODED_LEN,
28192                __tmp.remaining(),
28193            )
28194        }
28195        __tmp.put_u32_le(self.custom_mode);
28196        __tmp.put_u8(self.target_system);
28197        __tmp.put_u8(self.base_mode as u8);
28198        if matches!(version, MavlinkVersion::V2) {
28199            let len = __tmp.len();
28200            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28201        } else {
28202            __tmp.len()
28203        }
28204    }
28205}
28206#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
28207#[doc = ""]
28208#[doc = "ID: 86"]
28209#[derive(Debug, Clone, PartialEq)]
28210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28211#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28212#[cfg_attr(feature = "ts", derive(TS))]
28213#[cfg_attr(feature = "ts", ts(export))]
28214pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
28215    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28216    pub time_boot_ms: u32,
28217    #[doc = "Latitude in WGS84 frame"]
28218    pub lat_int: i32,
28219    #[doc = "Longitude in WGS84 frame"]
28220    pub lon_int: i32,
28221    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
28222    pub alt: f32,
28223    #[doc = "X velocity in NED frame"]
28224    pub vx: f32,
28225    #[doc = "Y velocity in NED frame"]
28226    pub vy: f32,
28227    #[doc = "Z velocity in NED frame"]
28228    pub vz: f32,
28229    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28230    pub afx: f32,
28231    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28232    pub afy: f32,
28233    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28234    pub afz: f32,
28235    #[doc = "yaw setpoint"]
28236    pub yaw: f32,
28237    #[doc = "yaw rate setpoint"]
28238    pub yaw_rate: f32,
28239    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28240    pub type_mask: PositionTargetTypemask,
28241    #[doc = "System ID"]
28242    pub target_system: u8,
28243    #[doc = "Component ID"]
28244    pub target_component: u8,
28245    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28246    pub coordinate_frame: MavFrame,
28247}
28248impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28249    pub const ENCODED_LEN: usize = 53usize;
28250    pub const DEFAULT: Self = Self {
28251        time_boot_ms: 0_u32,
28252        lat_int: 0_i32,
28253        lon_int: 0_i32,
28254        alt: 0.0_f32,
28255        vx: 0.0_f32,
28256        vy: 0.0_f32,
28257        vz: 0.0_f32,
28258        afx: 0.0_f32,
28259        afy: 0.0_f32,
28260        afz: 0.0_f32,
28261        yaw: 0.0_f32,
28262        yaw_rate: 0.0_f32,
28263        type_mask: PositionTargetTypemask::DEFAULT,
28264        target_system: 0_u8,
28265        target_component: 0_u8,
28266        coordinate_frame: MavFrame::DEFAULT,
28267    };
28268    #[cfg(feature = "arbitrary")]
28269    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28270        use arbitrary::{Arbitrary, Unstructured};
28271        let mut buf = [0u8; 1024];
28272        rng.fill_bytes(&mut buf);
28273        let mut unstructured = Unstructured::new(&buf);
28274        Self::arbitrary(&mut unstructured).unwrap_or_default()
28275    }
28276}
28277impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28278    fn default() -> Self {
28279        Self::DEFAULT.clone()
28280    }
28281}
28282impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28283    type Message = MavMessage;
28284    const ID: u32 = 86u32;
28285    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28286    const EXTRA_CRC: u8 = 5u8;
28287    const ENCODED_LEN: usize = 53usize;
28288    fn deser(
28289        _version: MavlinkVersion,
28290        __input: &[u8],
28291    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28292        let avail_len = __input.len();
28293        let mut payload_buf = [0; Self::ENCODED_LEN];
28294        let mut buf = if avail_len < Self::ENCODED_LEN {
28295            payload_buf[0..avail_len].copy_from_slice(__input);
28296            Bytes::new(&payload_buf)
28297        } else {
28298            Bytes::new(__input)
28299        };
28300        let mut __struct = Self::default();
28301        __struct.time_boot_ms = buf.get_u32_le();
28302        __struct.lat_int = buf.get_i32_le();
28303        __struct.lon_int = buf.get_i32_le();
28304        __struct.alt = buf.get_f32_le();
28305        __struct.vx = buf.get_f32_le();
28306        __struct.vy = buf.get_f32_le();
28307        __struct.vz = buf.get_f32_le();
28308        __struct.afx = buf.get_f32_le();
28309        __struct.afy = buf.get_f32_le();
28310        __struct.afz = buf.get_f32_le();
28311        __struct.yaw = buf.get_f32_le();
28312        __struct.yaw_rate = buf.get_f32_le();
28313        let tmp = buf.get_u16_le();
28314        __struct.type_mask =
28315            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
28316                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28317                    flag_type: "PositionTargetTypemask",
28318                    value: tmp as u64,
28319                })?;
28320        __struct.target_system = buf.get_u8();
28321        __struct.target_component = buf.get_u8();
28322        let tmp = buf.get_u8();
28323        __struct.coordinate_frame =
28324            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28325                enum_type: "MavFrame",
28326                value: tmp as u64,
28327            })?;
28328        Ok(__struct)
28329    }
28330    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28331        let mut __tmp = BytesMut::new(bytes);
28332        #[allow(clippy::absurd_extreme_comparisons)]
28333        #[allow(unused_comparisons)]
28334        if __tmp.remaining() < Self::ENCODED_LEN {
28335            panic!(
28336                "buffer is too small (need {} bytes, but got {})",
28337                Self::ENCODED_LEN,
28338                __tmp.remaining(),
28339            )
28340        }
28341        __tmp.put_u32_le(self.time_boot_ms);
28342        __tmp.put_i32_le(self.lat_int);
28343        __tmp.put_i32_le(self.lon_int);
28344        __tmp.put_f32_le(self.alt);
28345        __tmp.put_f32_le(self.vx);
28346        __tmp.put_f32_le(self.vy);
28347        __tmp.put_f32_le(self.vz);
28348        __tmp.put_f32_le(self.afx);
28349        __tmp.put_f32_le(self.afy);
28350        __tmp.put_f32_le(self.afz);
28351        __tmp.put_f32_le(self.yaw);
28352        __tmp.put_f32_le(self.yaw_rate);
28353        __tmp.put_u16_le(self.type_mask.bits() as u16);
28354        __tmp.put_u8(self.target_system);
28355        __tmp.put_u8(self.target_component);
28356        __tmp.put_u8(self.coordinate_frame as u8);
28357        if matches!(version, MavlinkVersion::V2) {
28358            let len = __tmp.len();
28359            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28360        } else {
28361            __tmp.len()
28362        }
28363    }
28364}
28365#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28366#[doc = ""]
28367#[doc = "ID: 84"]
28368#[derive(Debug, Clone, PartialEq)]
28369#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28370#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28371#[cfg_attr(feature = "ts", derive(TS))]
28372#[cfg_attr(feature = "ts", ts(export))]
28373pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28374    #[doc = "Timestamp (time since system boot)."]
28375    pub time_boot_ms: u32,
28376    #[doc = "X Position in NED frame"]
28377    pub x: f32,
28378    #[doc = "Y Position in NED frame"]
28379    pub y: f32,
28380    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28381    pub z: f32,
28382    #[doc = "X velocity in NED frame"]
28383    pub vx: f32,
28384    #[doc = "Y velocity in NED frame"]
28385    pub vy: f32,
28386    #[doc = "Z velocity in NED frame"]
28387    pub vz: f32,
28388    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28389    pub afx: f32,
28390    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28391    pub afy: f32,
28392    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28393    pub afz: f32,
28394    #[doc = "yaw setpoint"]
28395    pub yaw: f32,
28396    #[doc = "yaw rate setpoint"]
28397    pub yaw_rate: f32,
28398    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28399    pub type_mask: PositionTargetTypemask,
28400    #[doc = "System ID"]
28401    pub target_system: u8,
28402    #[doc = "Component ID"]
28403    pub target_component: u8,
28404    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28405    pub coordinate_frame: MavFrame,
28406}
28407impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28408    pub const ENCODED_LEN: usize = 53usize;
28409    pub const DEFAULT: Self = Self {
28410        time_boot_ms: 0_u32,
28411        x: 0.0_f32,
28412        y: 0.0_f32,
28413        z: 0.0_f32,
28414        vx: 0.0_f32,
28415        vy: 0.0_f32,
28416        vz: 0.0_f32,
28417        afx: 0.0_f32,
28418        afy: 0.0_f32,
28419        afz: 0.0_f32,
28420        yaw: 0.0_f32,
28421        yaw_rate: 0.0_f32,
28422        type_mask: PositionTargetTypemask::DEFAULT,
28423        target_system: 0_u8,
28424        target_component: 0_u8,
28425        coordinate_frame: MavFrame::DEFAULT,
28426    };
28427    #[cfg(feature = "arbitrary")]
28428    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28429        use arbitrary::{Arbitrary, Unstructured};
28430        let mut buf = [0u8; 1024];
28431        rng.fill_bytes(&mut buf);
28432        let mut unstructured = Unstructured::new(&buf);
28433        Self::arbitrary(&mut unstructured).unwrap_or_default()
28434    }
28435}
28436impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28437    fn default() -> Self {
28438        Self::DEFAULT.clone()
28439    }
28440}
28441impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28442    type Message = MavMessage;
28443    const ID: u32 = 84u32;
28444    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28445    const EXTRA_CRC: u8 = 143u8;
28446    const ENCODED_LEN: usize = 53usize;
28447    fn deser(
28448        _version: MavlinkVersion,
28449        __input: &[u8],
28450    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28451        let avail_len = __input.len();
28452        let mut payload_buf = [0; Self::ENCODED_LEN];
28453        let mut buf = if avail_len < Self::ENCODED_LEN {
28454            payload_buf[0..avail_len].copy_from_slice(__input);
28455            Bytes::new(&payload_buf)
28456        } else {
28457            Bytes::new(__input)
28458        };
28459        let mut __struct = Self::default();
28460        __struct.time_boot_ms = buf.get_u32_le();
28461        __struct.x = buf.get_f32_le();
28462        __struct.y = buf.get_f32_le();
28463        __struct.z = buf.get_f32_le();
28464        __struct.vx = buf.get_f32_le();
28465        __struct.vy = buf.get_f32_le();
28466        __struct.vz = buf.get_f32_le();
28467        __struct.afx = buf.get_f32_le();
28468        __struct.afy = buf.get_f32_le();
28469        __struct.afz = buf.get_f32_le();
28470        __struct.yaw = buf.get_f32_le();
28471        __struct.yaw_rate = buf.get_f32_le();
28472        let tmp = buf.get_u16_le();
28473        __struct.type_mask =
28474            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
28475                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28476                    flag_type: "PositionTargetTypemask",
28477                    value: tmp as u64,
28478                })?;
28479        __struct.target_system = buf.get_u8();
28480        __struct.target_component = buf.get_u8();
28481        let tmp = buf.get_u8();
28482        __struct.coordinate_frame =
28483            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28484                enum_type: "MavFrame",
28485                value: tmp as u64,
28486            })?;
28487        Ok(__struct)
28488    }
28489    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28490        let mut __tmp = BytesMut::new(bytes);
28491        #[allow(clippy::absurd_extreme_comparisons)]
28492        #[allow(unused_comparisons)]
28493        if __tmp.remaining() < Self::ENCODED_LEN {
28494            panic!(
28495                "buffer is too small (need {} bytes, but got {})",
28496                Self::ENCODED_LEN,
28497                __tmp.remaining(),
28498            )
28499        }
28500        __tmp.put_u32_le(self.time_boot_ms);
28501        __tmp.put_f32_le(self.x);
28502        __tmp.put_f32_le(self.y);
28503        __tmp.put_f32_le(self.z);
28504        __tmp.put_f32_le(self.vx);
28505        __tmp.put_f32_le(self.vy);
28506        __tmp.put_f32_le(self.vz);
28507        __tmp.put_f32_le(self.afx);
28508        __tmp.put_f32_le(self.afy);
28509        __tmp.put_f32_le(self.afz);
28510        __tmp.put_f32_le(self.yaw);
28511        __tmp.put_f32_le(self.yaw_rate);
28512        __tmp.put_u16_le(self.type_mask.bits() as u16);
28513        __tmp.put_u8(self.target_system);
28514        __tmp.put_u8(self.target_component);
28515        __tmp.put_u8(self.coordinate_frame as u8);
28516        if matches!(version, MavlinkVersion::V2) {
28517            let len = __tmp.len();
28518            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28519        } else {
28520            __tmp.len()
28521        }
28522    }
28523}
28524#[doc = "Status of simulation environment, if used."]
28525#[doc = ""]
28526#[doc = "ID: 108"]
28527#[derive(Debug, Clone, PartialEq)]
28528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28529#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28530#[cfg_attr(feature = "ts", derive(TS))]
28531#[cfg_attr(feature = "ts", ts(export))]
28532pub struct SIM_STATE_DATA {
28533    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28534    pub q1: f32,
28535    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28536    pub q2: f32,
28537    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28538    pub q3: f32,
28539    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28540    pub q4: f32,
28541    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28542    pub roll: f32,
28543    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28544    pub pitch: f32,
28545    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28546    pub yaw: f32,
28547    #[doc = "X acceleration"]
28548    pub xacc: f32,
28549    #[doc = "Y acceleration"]
28550    pub yacc: f32,
28551    #[doc = "Z acceleration"]
28552    pub zacc: f32,
28553    #[doc = "Angular speed around X axis"]
28554    pub xgyro: f32,
28555    #[doc = "Angular speed around Y axis"]
28556    pub ygyro: f32,
28557    #[doc = "Angular speed around Z axis"]
28558    pub zgyro: f32,
28559    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28560    pub lat: f32,
28561    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28562    pub lon: f32,
28563    #[doc = "Altitude"]
28564    pub alt: f32,
28565    #[doc = "Horizontal position standard deviation"]
28566    pub std_dev_horz: f32,
28567    #[doc = "Vertical position standard deviation"]
28568    pub std_dev_vert: f32,
28569    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28570    pub vn: f32,
28571    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28572    pub ve: f32,
28573    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28574    pub vd: f32,
28575    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28576    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28577    pub lat_int: i32,
28578    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28579    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28580    pub lon_int: i32,
28581}
28582impl SIM_STATE_DATA {
28583    pub const ENCODED_LEN: usize = 92usize;
28584    pub const DEFAULT: Self = Self {
28585        q1: 0.0_f32,
28586        q2: 0.0_f32,
28587        q3: 0.0_f32,
28588        q4: 0.0_f32,
28589        roll: 0.0_f32,
28590        pitch: 0.0_f32,
28591        yaw: 0.0_f32,
28592        xacc: 0.0_f32,
28593        yacc: 0.0_f32,
28594        zacc: 0.0_f32,
28595        xgyro: 0.0_f32,
28596        ygyro: 0.0_f32,
28597        zgyro: 0.0_f32,
28598        lat: 0.0_f32,
28599        lon: 0.0_f32,
28600        alt: 0.0_f32,
28601        std_dev_horz: 0.0_f32,
28602        std_dev_vert: 0.0_f32,
28603        vn: 0.0_f32,
28604        ve: 0.0_f32,
28605        vd: 0.0_f32,
28606        lat_int: 0_i32,
28607        lon_int: 0_i32,
28608    };
28609    #[cfg(feature = "arbitrary")]
28610    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28611        use arbitrary::{Arbitrary, Unstructured};
28612        let mut buf = [0u8; 1024];
28613        rng.fill_bytes(&mut buf);
28614        let mut unstructured = Unstructured::new(&buf);
28615        Self::arbitrary(&mut unstructured).unwrap_or_default()
28616    }
28617}
28618impl Default for SIM_STATE_DATA {
28619    fn default() -> Self {
28620        Self::DEFAULT.clone()
28621    }
28622}
28623impl MessageData for SIM_STATE_DATA {
28624    type Message = MavMessage;
28625    const ID: u32 = 108u32;
28626    const NAME: &'static str = "SIM_STATE";
28627    const EXTRA_CRC: u8 = 32u8;
28628    const ENCODED_LEN: usize = 92usize;
28629    fn deser(
28630        _version: MavlinkVersion,
28631        __input: &[u8],
28632    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28633        let avail_len = __input.len();
28634        let mut payload_buf = [0; Self::ENCODED_LEN];
28635        let mut buf = if avail_len < Self::ENCODED_LEN {
28636            payload_buf[0..avail_len].copy_from_slice(__input);
28637            Bytes::new(&payload_buf)
28638        } else {
28639            Bytes::new(__input)
28640        };
28641        let mut __struct = Self::default();
28642        __struct.q1 = buf.get_f32_le();
28643        __struct.q2 = buf.get_f32_le();
28644        __struct.q3 = buf.get_f32_le();
28645        __struct.q4 = buf.get_f32_le();
28646        __struct.roll = buf.get_f32_le();
28647        __struct.pitch = buf.get_f32_le();
28648        __struct.yaw = buf.get_f32_le();
28649        __struct.xacc = buf.get_f32_le();
28650        __struct.yacc = buf.get_f32_le();
28651        __struct.zacc = buf.get_f32_le();
28652        __struct.xgyro = buf.get_f32_le();
28653        __struct.ygyro = buf.get_f32_le();
28654        __struct.zgyro = buf.get_f32_le();
28655        __struct.lat = buf.get_f32_le();
28656        __struct.lon = buf.get_f32_le();
28657        __struct.alt = buf.get_f32_le();
28658        __struct.std_dev_horz = buf.get_f32_le();
28659        __struct.std_dev_vert = buf.get_f32_le();
28660        __struct.vn = buf.get_f32_le();
28661        __struct.ve = buf.get_f32_le();
28662        __struct.vd = buf.get_f32_le();
28663        __struct.lat_int = buf.get_i32_le();
28664        __struct.lon_int = buf.get_i32_le();
28665        Ok(__struct)
28666    }
28667    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28668        let mut __tmp = BytesMut::new(bytes);
28669        #[allow(clippy::absurd_extreme_comparisons)]
28670        #[allow(unused_comparisons)]
28671        if __tmp.remaining() < Self::ENCODED_LEN {
28672            panic!(
28673                "buffer is too small (need {} bytes, but got {})",
28674                Self::ENCODED_LEN,
28675                __tmp.remaining(),
28676            )
28677        }
28678        __tmp.put_f32_le(self.q1);
28679        __tmp.put_f32_le(self.q2);
28680        __tmp.put_f32_le(self.q3);
28681        __tmp.put_f32_le(self.q4);
28682        __tmp.put_f32_le(self.roll);
28683        __tmp.put_f32_le(self.pitch);
28684        __tmp.put_f32_le(self.yaw);
28685        __tmp.put_f32_le(self.xacc);
28686        __tmp.put_f32_le(self.yacc);
28687        __tmp.put_f32_le(self.zacc);
28688        __tmp.put_f32_le(self.xgyro);
28689        __tmp.put_f32_le(self.ygyro);
28690        __tmp.put_f32_le(self.zgyro);
28691        __tmp.put_f32_le(self.lat);
28692        __tmp.put_f32_le(self.lon);
28693        __tmp.put_f32_le(self.alt);
28694        __tmp.put_f32_le(self.std_dev_horz);
28695        __tmp.put_f32_le(self.std_dev_vert);
28696        __tmp.put_f32_le(self.vn);
28697        __tmp.put_f32_le(self.ve);
28698        __tmp.put_f32_le(self.vd);
28699        if matches!(version, MavlinkVersion::V2) {
28700            __tmp.put_i32_le(self.lat_int);
28701            __tmp.put_i32_le(self.lon_int);
28702            let len = __tmp.len();
28703            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28704        } else {
28705            __tmp.len()
28706        }
28707    }
28708}
28709#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28710#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28711#[doc = ""]
28712#[doc = "ID: 370"]
28713#[derive(Debug, Clone, PartialEq)]
28714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28716#[cfg_attr(feature = "ts", derive(TS))]
28717#[cfg_attr(feature = "ts", ts(export))]
28718pub struct SMART_BATTERY_INFO_DATA {
28719    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28720    pub capacity_full_specification: i32,
28721    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
28722    pub capacity_full: i32,
28723    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
28724    pub cycle_count: u16,
28725    #[doc = "Battery weight. 0: field not provided."]
28726    pub weight: u16,
28727    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
28728    pub discharge_minimum_voltage: u16,
28729    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
28730    pub charging_minimum_voltage: u16,
28731    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
28732    pub resting_minimum_voltage: u16,
28733    #[doc = "Battery ID"]
28734    pub id: u8,
28735    #[doc = "Function of the battery"]
28736    pub battery_function: MavBatteryFunction,
28737    #[doc = "Type (chemistry) of the battery"]
28738    pub mavtype: MavBatteryType,
28739    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
28740    #[cfg_attr(feature = "ts", ts(type = "string"))]
28741    pub serial_number: CharArray<16>,
28742    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
28743    #[cfg_attr(feature = "ts", ts(type = "string"))]
28744    pub device_name: CharArray<50>,
28745    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
28746    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28747    pub charging_maximum_voltage: u16,
28748    #[doc = "Number of battery cells in series. 0: field not provided."]
28749    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28750    pub cells_in_series: u8,
28751    #[doc = "Maximum pack discharge current. 0: field not provided."]
28752    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28753    pub discharge_maximum_current: u32,
28754    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
28755    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28756    pub discharge_maximum_burst_current: u32,
28757    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
28758    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28759    #[cfg_attr(feature = "ts", ts(type = "string"))]
28760    pub manufacture_date: CharArray<11>,
28761}
28762impl SMART_BATTERY_INFO_DATA {
28763    pub const ENCODED_LEN: usize = 109usize;
28764    pub const DEFAULT: Self = Self {
28765        capacity_full_specification: 0_i32,
28766        capacity_full: 0_i32,
28767        cycle_count: 0_u16,
28768        weight: 0_u16,
28769        discharge_minimum_voltage: 0_u16,
28770        charging_minimum_voltage: 0_u16,
28771        resting_minimum_voltage: 0_u16,
28772        id: 0_u8,
28773        battery_function: MavBatteryFunction::DEFAULT,
28774        mavtype: MavBatteryType::DEFAULT,
28775        serial_number: CharArray::new([0_u8; 16usize]),
28776        device_name: CharArray::new([0_u8; 50usize]),
28777        charging_maximum_voltage: 0_u16,
28778        cells_in_series: 0_u8,
28779        discharge_maximum_current: 0_u32,
28780        discharge_maximum_burst_current: 0_u32,
28781        manufacture_date: CharArray::new([0_u8; 11usize]),
28782    };
28783    #[cfg(feature = "arbitrary")]
28784    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28785        use arbitrary::{Arbitrary, Unstructured};
28786        let mut buf = [0u8; 1024];
28787        rng.fill_bytes(&mut buf);
28788        let mut unstructured = Unstructured::new(&buf);
28789        Self::arbitrary(&mut unstructured).unwrap_or_default()
28790    }
28791}
28792impl Default for SMART_BATTERY_INFO_DATA {
28793    fn default() -> Self {
28794        Self::DEFAULT.clone()
28795    }
28796}
28797impl MessageData for SMART_BATTERY_INFO_DATA {
28798    type Message = MavMessage;
28799    const ID: u32 = 370u32;
28800    const NAME: &'static str = "SMART_BATTERY_INFO";
28801    const EXTRA_CRC: u8 = 75u8;
28802    const ENCODED_LEN: usize = 109usize;
28803    fn deser(
28804        _version: MavlinkVersion,
28805        __input: &[u8],
28806    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28807        let avail_len = __input.len();
28808        let mut payload_buf = [0; Self::ENCODED_LEN];
28809        let mut buf = if avail_len < Self::ENCODED_LEN {
28810            payload_buf[0..avail_len].copy_from_slice(__input);
28811            Bytes::new(&payload_buf)
28812        } else {
28813            Bytes::new(__input)
28814        };
28815        let mut __struct = Self::default();
28816        __struct.capacity_full_specification = buf.get_i32_le();
28817        __struct.capacity_full = buf.get_i32_le();
28818        __struct.cycle_count = buf.get_u16_le();
28819        __struct.weight = buf.get_u16_le();
28820        __struct.discharge_minimum_voltage = buf.get_u16_le();
28821        __struct.charging_minimum_voltage = buf.get_u16_le();
28822        __struct.resting_minimum_voltage = buf.get_u16_le();
28823        __struct.id = buf.get_u8();
28824        let tmp = buf.get_u8();
28825        __struct.battery_function =
28826            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28827                enum_type: "MavBatteryFunction",
28828                value: tmp as u64,
28829            })?;
28830        let tmp = buf.get_u8();
28831        __struct.mavtype =
28832            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28833                enum_type: "MavBatteryType",
28834                value: tmp as u64,
28835            })?;
28836        let mut tmp = [0_u8; 16usize];
28837        for v in &mut tmp {
28838            *v = buf.get_u8();
28839        }
28840        __struct.serial_number = CharArray::new(tmp);
28841        let mut tmp = [0_u8; 50usize];
28842        for v in &mut tmp {
28843            *v = buf.get_u8();
28844        }
28845        __struct.device_name = CharArray::new(tmp);
28846        __struct.charging_maximum_voltage = buf.get_u16_le();
28847        __struct.cells_in_series = buf.get_u8();
28848        __struct.discharge_maximum_current = buf.get_u32_le();
28849        __struct.discharge_maximum_burst_current = buf.get_u32_le();
28850        let mut tmp = [0_u8; 11usize];
28851        for v in &mut tmp {
28852            *v = buf.get_u8();
28853        }
28854        __struct.manufacture_date = CharArray::new(tmp);
28855        Ok(__struct)
28856    }
28857    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28858        let mut __tmp = BytesMut::new(bytes);
28859        #[allow(clippy::absurd_extreme_comparisons)]
28860        #[allow(unused_comparisons)]
28861        if __tmp.remaining() < Self::ENCODED_LEN {
28862            panic!(
28863                "buffer is too small (need {} bytes, but got {})",
28864                Self::ENCODED_LEN,
28865                __tmp.remaining(),
28866            )
28867        }
28868        __tmp.put_i32_le(self.capacity_full_specification);
28869        __tmp.put_i32_le(self.capacity_full);
28870        __tmp.put_u16_le(self.cycle_count);
28871        __tmp.put_u16_le(self.weight);
28872        __tmp.put_u16_le(self.discharge_minimum_voltage);
28873        __tmp.put_u16_le(self.charging_minimum_voltage);
28874        __tmp.put_u16_le(self.resting_minimum_voltage);
28875        __tmp.put_u8(self.id);
28876        __tmp.put_u8(self.battery_function as u8);
28877        __tmp.put_u8(self.mavtype as u8);
28878        for val in &self.serial_number {
28879            __tmp.put_u8(*val);
28880        }
28881        for val in &self.device_name {
28882            __tmp.put_u8(*val);
28883        }
28884        if matches!(version, MavlinkVersion::V2) {
28885            __tmp.put_u16_le(self.charging_maximum_voltage);
28886            __tmp.put_u8(self.cells_in_series);
28887            __tmp.put_u32_le(self.discharge_maximum_current);
28888            __tmp.put_u32_le(self.discharge_maximum_burst_current);
28889            for val in &self.manufacture_date {
28890                __tmp.put_u8(*val);
28891            }
28892            let len = __tmp.len();
28893            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28894        } else {
28895            __tmp.len()
28896        }
28897    }
28898}
28899#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
28900#[doc = ""]
28901#[doc = "ID: 253"]
28902#[derive(Debug, Clone, PartialEq)]
28903#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28904#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28905#[cfg_attr(feature = "ts", derive(TS))]
28906#[cfg_attr(feature = "ts", ts(export))]
28907pub struct STATUSTEXT_DATA {
28908    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
28909    pub severity: MavSeverity,
28910    #[doc = "Status text message, without null termination character"]
28911    #[cfg_attr(feature = "ts", ts(type = "string"))]
28912    pub text: CharArray<50>,
28913    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
28914    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28915    pub id: u16,
28916    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
28917    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28918    pub chunk_seq: u8,
28919}
28920impl STATUSTEXT_DATA {
28921    pub const ENCODED_LEN: usize = 54usize;
28922    pub const DEFAULT: Self = Self {
28923        severity: MavSeverity::DEFAULT,
28924        text: CharArray::new([0_u8; 50usize]),
28925        id: 0_u16,
28926        chunk_seq: 0_u8,
28927    };
28928    #[cfg(feature = "arbitrary")]
28929    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28930        use arbitrary::{Arbitrary, Unstructured};
28931        let mut buf = [0u8; 1024];
28932        rng.fill_bytes(&mut buf);
28933        let mut unstructured = Unstructured::new(&buf);
28934        Self::arbitrary(&mut unstructured).unwrap_or_default()
28935    }
28936}
28937impl Default for STATUSTEXT_DATA {
28938    fn default() -> Self {
28939        Self::DEFAULT.clone()
28940    }
28941}
28942impl MessageData for STATUSTEXT_DATA {
28943    type Message = MavMessage;
28944    const ID: u32 = 253u32;
28945    const NAME: &'static str = "STATUSTEXT";
28946    const EXTRA_CRC: u8 = 83u8;
28947    const ENCODED_LEN: usize = 54usize;
28948    fn deser(
28949        _version: MavlinkVersion,
28950        __input: &[u8],
28951    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28952        let avail_len = __input.len();
28953        let mut payload_buf = [0; Self::ENCODED_LEN];
28954        let mut buf = if avail_len < Self::ENCODED_LEN {
28955            payload_buf[0..avail_len].copy_from_slice(__input);
28956            Bytes::new(&payload_buf)
28957        } else {
28958            Bytes::new(__input)
28959        };
28960        let mut __struct = Self::default();
28961        let tmp = buf.get_u8();
28962        __struct.severity =
28963            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28964                enum_type: "MavSeverity",
28965                value: tmp as u64,
28966            })?;
28967        let mut tmp = [0_u8; 50usize];
28968        for v in &mut tmp {
28969            *v = buf.get_u8();
28970        }
28971        __struct.text = CharArray::new(tmp);
28972        __struct.id = buf.get_u16_le();
28973        __struct.chunk_seq = buf.get_u8();
28974        Ok(__struct)
28975    }
28976    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28977        let mut __tmp = BytesMut::new(bytes);
28978        #[allow(clippy::absurd_extreme_comparisons)]
28979        #[allow(unused_comparisons)]
28980        if __tmp.remaining() < Self::ENCODED_LEN {
28981            panic!(
28982                "buffer is too small (need {} bytes, but got {})",
28983                Self::ENCODED_LEN,
28984                __tmp.remaining(),
28985            )
28986        }
28987        __tmp.put_u8(self.severity as u8);
28988        for val in &self.text {
28989            __tmp.put_u8(*val);
28990        }
28991        if matches!(version, MavlinkVersion::V2) {
28992            __tmp.put_u16_le(self.id);
28993            __tmp.put_u8(self.chunk_seq);
28994            let len = __tmp.len();
28995            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28996        } else {
28997            __tmp.len()
28998        }
28999    }
29000}
29001#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29002#[doc = ""]
29003#[doc = "ID: 261"]
29004#[derive(Debug, Clone, PartialEq)]
29005#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29006#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29007#[cfg_attr(feature = "ts", derive(TS))]
29008#[cfg_attr(feature = "ts", ts(export))]
29009pub struct STORAGE_INFORMATION_DATA {
29010    #[doc = "Timestamp (time since system boot)."]
29011    pub time_boot_ms: u32,
29012    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29013    pub total_capacity: f32,
29014    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29015    pub used_capacity: f32,
29016    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29017    pub available_capacity: f32,
29018    #[doc = "Read speed."]
29019    pub read_speed: f32,
29020    #[doc = "Write speed."]
29021    pub write_speed: f32,
29022    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29023    pub storage_id: u8,
29024    #[doc = "Number of storage devices"]
29025    pub storage_count: u8,
29026    #[doc = "Status of storage"]
29027    pub status: StorageStatus,
29028    #[doc = "Type of storage"]
29029    #[cfg_attr(feature = "serde", serde(default))]
29030    pub mavtype: StorageType,
29031    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29032    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29033    #[cfg_attr(feature = "ts", ts(type = "string"))]
29034    pub name: CharArray<32>,
29035    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29036    #[cfg_attr(feature = "serde", serde(default))]
29037    pub storage_usage: StorageUsageFlag,
29038}
29039impl STORAGE_INFORMATION_DATA {
29040    pub const ENCODED_LEN: usize = 61usize;
29041    pub const DEFAULT: Self = Self {
29042        time_boot_ms: 0_u32,
29043        total_capacity: 0.0_f32,
29044        used_capacity: 0.0_f32,
29045        available_capacity: 0.0_f32,
29046        read_speed: 0.0_f32,
29047        write_speed: 0.0_f32,
29048        storage_id: 0_u8,
29049        storage_count: 0_u8,
29050        status: StorageStatus::DEFAULT,
29051        mavtype: StorageType::DEFAULT,
29052        name: CharArray::new([0_u8; 32usize]),
29053        storage_usage: StorageUsageFlag::DEFAULT,
29054    };
29055    #[cfg(feature = "arbitrary")]
29056    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29057        use arbitrary::{Arbitrary, Unstructured};
29058        let mut buf = [0u8; 1024];
29059        rng.fill_bytes(&mut buf);
29060        let mut unstructured = Unstructured::new(&buf);
29061        Self::arbitrary(&mut unstructured).unwrap_or_default()
29062    }
29063}
29064impl Default for STORAGE_INFORMATION_DATA {
29065    fn default() -> Self {
29066        Self::DEFAULT.clone()
29067    }
29068}
29069impl MessageData for STORAGE_INFORMATION_DATA {
29070    type Message = MavMessage;
29071    const ID: u32 = 261u32;
29072    const NAME: &'static str = "STORAGE_INFORMATION";
29073    const EXTRA_CRC: u8 = 179u8;
29074    const ENCODED_LEN: usize = 61usize;
29075    fn deser(
29076        _version: MavlinkVersion,
29077        __input: &[u8],
29078    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29079        let avail_len = __input.len();
29080        let mut payload_buf = [0; Self::ENCODED_LEN];
29081        let mut buf = if avail_len < Self::ENCODED_LEN {
29082            payload_buf[0..avail_len].copy_from_slice(__input);
29083            Bytes::new(&payload_buf)
29084        } else {
29085            Bytes::new(__input)
29086        };
29087        let mut __struct = Self::default();
29088        __struct.time_boot_ms = buf.get_u32_le();
29089        __struct.total_capacity = buf.get_f32_le();
29090        __struct.used_capacity = buf.get_f32_le();
29091        __struct.available_capacity = buf.get_f32_le();
29092        __struct.read_speed = buf.get_f32_le();
29093        __struct.write_speed = buf.get_f32_le();
29094        __struct.storage_id = buf.get_u8();
29095        __struct.storage_count = buf.get_u8();
29096        let tmp = buf.get_u8();
29097        __struct.status =
29098            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29099                enum_type: "StorageStatus",
29100                value: tmp as u64,
29101            })?;
29102        let tmp = buf.get_u8();
29103        __struct.mavtype =
29104            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29105                enum_type: "StorageType",
29106                value: tmp as u64,
29107            })?;
29108        let mut tmp = [0_u8; 32usize];
29109        for v in &mut tmp {
29110            *v = buf.get_u8();
29111        }
29112        __struct.name = CharArray::new(tmp);
29113        let tmp = buf.get_u8();
29114        __struct.storage_usage = StorageUsageFlag::from_bits(
29115            tmp as <StorageUsageFlag as Flags>::Bits,
29116        )
29117        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29118            flag_type: "StorageUsageFlag",
29119            value: tmp as u64,
29120        })?;
29121        Ok(__struct)
29122    }
29123    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29124        let mut __tmp = BytesMut::new(bytes);
29125        #[allow(clippy::absurd_extreme_comparisons)]
29126        #[allow(unused_comparisons)]
29127        if __tmp.remaining() < Self::ENCODED_LEN {
29128            panic!(
29129                "buffer is too small (need {} bytes, but got {})",
29130                Self::ENCODED_LEN,
29131                __tmp.remaining(),
29132            )
29133        }
29134        __tmp.put_u32_le(self.time_boot_ms);
29135        __tmp.put_f32_le(self.total_capacity);
29136        __tmp.put_f32_le(self.used_capacity);
29137        __tmp.put_f32_le(self.available_capacity);
29138        __tmp.put_f32_le(self.read_speed);
29139        __tmp.put_f32_le(self.write_speed);
29140        __tmp.put_u8(self.storage_id);
29141        __tmp.put_u8(self.storage_count);
29142        __tmp.put_u8(self.status as u8);
29143        if matches!(version, MavlinkVersion::V2) {
29144            __tmp.put_u8(self.mavtype as u8);
29145            for val in &self.name {
29146                __tmp.put_u8(*val);
29147            }
29148            __tmp.put_u8(self.storage_usage.bits() as u8);
29149            let len = __tmp.len();
29150            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29151        } else {
29152            __tmp.len()
29153        }
29154    }
29155}
29156#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
29157#[doc = ""]
29158#[doc = "ID: 401"]
29159#[derive(Debug, Clone, PartialEq)]
29160#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29161#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29162#[cfg_attr(feature = "ts", derive(TS))]
29163#[cfg_attr(feature = "ts", ts(export))]
29164pub struct SUPPORTED_TUNES_DATA {
29165    #[doc = "Bitfield of supported tune formats."]
29166    pub format: TuneFormat,
29167    #[doc = "System ID"]
29168    pub target_system: u8,
29169    #[doc = "Component ID"]
29170    pub target_component: u8,
29171}
29172impl SUPPORTED_TUNES_DATA {
29173    pub const ENCODED_LEN: usize = 6usize;
29174    pub const DEFAULT: Self = Self {
29175        format: TuneFormat::DEFAULT,
29176        target_system: 0_u8,
29177        target_component: 0_u8,
29178    };
29179    #[cfg(feature = "arbitrary")]
29180    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29181        use arbitrary::{Arbitrary, Unstructured};
29182        let mut buf = [0u8; 1024];
29183        rng.fill_bytes(&mut buf);
29184        let mut unstructured = Unstructured::new(&buf);
29185        Self::arbitrary(&mut unstructured).unwrap_or_default()
29186    }
29187}
29188impl Default for SUPPORTED_TUNES_DATA {
29189    fn default() -> Self {
29190        Self::DEFAULT.clone()
29191    }
29192}
29193impl MessageData for SUPPORTED_TUNES_DATA {
29194    type Message = MavMessage;
29195    const ID: u32 = 401u32;
29196    const NAME: &'static str = "SUPPORTED_TUNES";
29197    const EXTRA_CRC: u8 = 183u8;
29198    const ENCODED_LEN: usize = 6usize;
29199    fn deser(
29200        _version: MavlinkVersion,
29201        __input: &[u8],
29202    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29203        let avail_len = __input.len();
29204        let mut payload_buf = [0; Self::ENCODED_LEN];
29205        let mut buf = if avail_len < Self::ENCODED_LEN {
29206            payload_buf[0..avail_len].copy_from_slice(__input);
29207            Bytes::new(&payload_buf)
29208        } else {
29209            Bytes::new(__input)
29210        };
29211        let mut __struct = Self::default();
29212        let tmp = buf.get_u32_le();
29213        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
29214            ::mavlink_core::error::ParserError::InvalidEnum {
29215                enum_type: "TuneFormat",
29216                value: tmp as u64,
29217            },
29218        )?;
29219        __struct.target_system = buf.get_u8();
29220        __struct.target_component = buf.get_u8();
29221        Ok(__struct)
29222    }
29223    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29224        let mut __tmp = BytesMut::new(bytes);
29225        #[allow(clippy::absurd_extreme_comparisons)]
29226        #[allow(unused_comparisons)]
29227        if __tmp.remaining() < Self::ENCODED_LEN {
29228            panic!(
29229                "buffer is too small (need {} bytes, but got {})",
29230                Self::ENCODED_LEN,
29231                __tmp.remaining(),
29232            )
29233        }
29234        __tmp.put_u32_le(self.format as u32);
29235        __tmp.put_u8(self.target_system);
29236        __tmp.put_u8(self.target_component);
29237        if matches!(version, MavlinkVersion::V2) {
29238            let len = __tmp.len();
29239            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29240        } else {
29241            __tmp.len()
29242        }
29243    }
29244}
29245#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29246#[doc = ""]
29247#[doc = "ID: 2"]
29248#[derive(Debug, Clone, PartialEq)]
29249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29250#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29251#[cfg_attr(feature = "ts", derive(TS))]
29252#[cfg_attr(feature = "ts", ts(export))]
29253pub struct SYSTEM_TIME_DATA {
29254    #[doc = "Timestamp (UNIX epoch time)."]
29255    pub time_unix_usec: u64,
29256    #[doc = "Timestamp (time since system boot)."]
29257    pub time_boot_ms: u32,
29258}
29259impl SYSTEM_TIME_DATA {
29260    pub const ENCODED_LEN: usize = 12usize;
29261    pub const DEFAULT: Self = Self {
29262        time_unix_usec: 0_u64,
29263        time_boot_ms: 0_u32,
29264    };
29265    #[cfg(feature = "arbitrary")]
29266    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29267        use arbitrary::{Arbitrary, Unstructured};
29268        let mut buf = [0u8; 1024];
29269        rng.fill_bytes(&mut buf);
29270        let mut unstructured = Unstructured::new(&buf);
29271        Self::arbitrary(&mut unstructured).unwrap_or_default()
29272    }
29273}
29274impl Default for SYSTEM_TIME_DATA {
29275    fn default() -> Self {
29276        Self::DEFAULT.clone()
29277    }
29278}
29279impl MessageData for SYSTEM_TIME_DATA {
29280    type Message = MavMessage;
29281    const ID: u32 = 2u32;
29282    const NAME: &'static str = "SYSTEM_TIME";
29283    const EXTRA_CRC: u8 = 137u8;
29284    const ENCODED_LEN: usize = 12usize;
29285    fn deser(
29286        _version: MavlinkVersion,
29287        __input: &[u8],
29288    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29289        let avail_len = __input.len();
29290        let mut payload_buf = [0; Self::ENCODED_LEN];
29291        let mut buf = if avail_len < Self::ENCODED_LEN {
29292            payload_buf[0..avail_len].copy_from_slice(__input);
29293            Bytes::new(&payload_buf)
29294        } else {
29295            Bytes::new(__input)
29296        };
29297        let mut __struct = Self::default();
29298        __struct.time_unix_usec = buf.get_u64_le();
29299        __struct.time_boot_ms = buf.get_u32_le();
29300        Ok(__struct)
29301    }
29302    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29303        let mut __tmp = BytesMut::new(bytes);
29304        #[allow(clippy::absurd_extreme_comparisons)]
29305        #[allow(unused_comparisons)]
29306        if __tmp.remaining() < Self::ENCODED_LEN {
29307            panic!(
29308                "buffer is too small (need {} bytes, but got {})",
29309                Self::ENCODED_LEN,
29310                __tmp.remaining(),
29311            )
29312        }
29313        __tmp.put_u64_le(self.time_unix_usec);
29314        __tmp.put_u32_le(self.time_boot_ms);
29315        if matches!(version, MavlinkVersion::V2) {
29316            let len = __tmp.len();
29317            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29318        } else {
29319            __tmp.len()
29320        }
29321    }
29322}
29323#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29324#[doc = ""]
29325#[doc = "ID: 1"]
29326#[derive(Debug, Clone, PartialEq)]
29327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29328#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29329#[cfg_attr(feature = "ts", derive(TS))]
29330#[cfg_attr(feature = "ts", ts(export))]
29331pub struct SYS_STATUS_DATA {
29332    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29333    pub onboard_control_sensors_present: MavSysStatusSensor,
29334    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29335    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29336    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29337    pub onboard_control_sensors_health: MavSysStatusSensor,
29338    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29339    pub load: u16,
29340    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29341    pub voltage_battery: u16,
29342    #[doc = "Battery current, -1: Current not sent by autopilot"]
29343    pub current_battery: i16,
29344    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29345    pub drop_rate_comm: u16,
29346    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29347    pub errors_comm: u16,
29348    #[doc = "Autopilot-specific errors"]
29349    pub errors_count1: u16,
29350    #[doc = "Autopilot-specific errors"]
29351    pub errors_count2: u16,
29352    #[doc = "Autopilot-specific errors"]
29353    pub errors_count3: u16,
29354    #[doc = "Autopilot-specific errors"]
29355    pub errors_count4: u16,
29356    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29357    pub battery_remaining: i8,
29358    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29359    #[cfg_attr(feature = "serde", serde(default))]
29360    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29361    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29362    #[cfg_attr(feature = "serde", serde(default))]
29363    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29364    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29365    #[cfg_attr(feature = "serde", serde(default))]
29366    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29367}
29368impl SYS_STATUS_DATA {
29369    pub const ENCODED_LEN: usize = 43usize;
29370    pub const DEFAULT: Self = Self {
29371        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29372        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29373        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29374        load: 0_u16,
29375        voltage_battery: 0_u16,
29376        current_battery: 0_i16,
29377        drop_rate_comm: 0_u16,
29378        errors_comm: 0_u16,
29379        errors_count1: 0_u16,
29380        errors_count2: 0_u16,
29381        errors_count3: 0_u16,
29382        errors_count4: 0_u16,
29383        battery_remaining: 0_i8,
29384        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29385        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29386        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29387    };
29388    #[cfg(feature = "arbitrary")]
29389    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29390        use arbitrary::{Arbitrary, Unstructured};
29391        let mut buf = [0u8; 1024];
29392        rng.fill_bytes(&mut buf);
29393        let mut unstructured = Unstructured::new(&buf);
29394        Self::arbitrary(&mut unstructured).unwrap_or_default()
29395    }
29396}
29397impl Default for SYS_STATUS_DATA {
29398    fn default() -> Self {
29399        Self::DEFAULT.clone()
29400    }
29401}
29402impl MessageData for SYS_STATUS_DATA {
29403    type Message = MavMessage;
29404    const ID: u32 = 1u32;
29405    const NAME: &'static str = "SYS_STATUS";
29406    const EXTRA_CRC: u8 = 124u8;
29407    const ENCODED_LEN: usize = 43usize;
29408    fn deser(
29409        _version: MavlinkVersion,
29410        __input: &[u8],
29411    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29412        let avail_len = __input.len();
29413        let mut payload_buf = [0; Self::ENCODED_LEN];
29414        let mut buf = if avail_len < Self::ENCODED_LEN {
29415            payload_buf[0..avail_len].copy_from_slice(__input);
29416            Bytes::new(&payload_buf)
29417        } else {
29418            Bytes::new(__input)
29419        };
29420        let mut __struct = Self::default();
29421        let tmp = buf.get_u32_le();
29422        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29423            tmp as <MavSysStatusSensor as Flags>::Bits,
29424        )
29425        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29426            flag_type: "MavSysStatusSensor",
29427            value: tmp as u64,
29428        })?;
29429        let tmp = buf.get_u32_le();
29430        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29431            tmp as <MavSysStatusSensor as Flags>::Bits,
29432        )
29433        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29434            flag_type: "MavSysStatusSensor",
29435            value: tmp as u64,
29436        })?;
29437        let tmp = buf.get_u32_le();
29438        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29439            tmp as <MavSysStatusSensor as Flags>::Bits,
29440        )
29441        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29442            flag_type: "MavSysStatusSensor",
29443            value: tmp as u64,
29444        })?;
29445        __struct.load = buf.get_u16_le();
29446        __struct.voltage_battery = buf.get_u16_le();
29447        __struct.current_battery = buf.get_i16_le();
29448        __struct.drop_rate_comm = buf.get_u16_le();
29449        __struct.errors_comm = buf.get_u16_le();
29450        __struct.errors_count1 = buf.get_u16_le();
29451        __struct.errors_count2 = buf.get_u16_le();
29452        __struct.errors_count3 = buf.get_u16_le();
29453        __struct.errors_count4 = buf.get_u16_le();
29454        __struct.battery_remaining = buf.get_i8();
29455        let tmp = buf.get_u32_le();
29456        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
29457            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29458        )
29459        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29460            flag_type: "MavSysStatusSensorExtended",
29461            value: tmp as u64,
29462        })?;
29463        let tmp = buf.get_u32_le();
29464        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
29465            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29466        )
29467        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29468            flag_type: "MavSysStatusSensorExtended",
29469            value: tmp as u64,
29470        })?;
29471        let tmp = buf.get_u32_le();
29472        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
29473            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
29474        )
29475        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29476            flag_type: "MavSysStatusSensorExtended",
29477            value: tmp as u64,
29478        })?;
29479        Ok(__struct)
29480    }
29481    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29482        let mut __tmp = BytesMut::new(bytes);
29483        #[allow(clippy::absurd_extreme_comparisons)]
29484        #[allow(unused_comparisons)]
29485        if __tmp.remaining() < Self::ENCODED_LEN {
29486            panic!(
29487                "buffer is too small (need {} bytes, but got {})",
29488                Self::ENCODED_LEN,
29489                __tmp.remaining(),
29490            )
29491        }
29492        __tmp.put_u32_le(self.onboard_control_sensors_present.bits() as u32);
29493        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits() as u32);
29494        __tmp.put_u32_le(self.onboard_control_sensors_health.bits() as u32);
29495        __tmp.put_u16_le(self.load);
29496        __tmp.put_u16_le(self.voltage_battery);
29497        __tmp.put_i16_le(self.current_battery);
29498        __tmp.put_u16_le(self.drop_rate_comm);
29499        __tmp.put_u16_le(self.errors_comm);
29500        __tmp.put_u16_le(self.errors_count1);
29501        __tmp.put_u16_le(self.errors_count2);
29502        __tmp.put_u16_le(self.errors_count3);
29503        __tmp.put_u16_le(self.errors_count4);
29504        __tmp.put_i8(self.battery_remaining);
29505        if matches!(version, MavlinkVersion::V2) {
29506            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits() as u32);
29507            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits() as u32);
29508            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits() as u32);
29509            let len = __tmp.len();
29510            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29511        } else {
29512            __tmp.len()
29513        }
29514    }
29515}
29516#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29517#[doc = ""]
29518#[doc = "ID: 135"]
29519#[derive(Debug, Clone, PartialEq)]
29520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29522#[cfg_attr(feature = "ts", derive(TS))]
29523#[cfg_attr(feature = "ts", ts(export))]
29524pub struct TERRAIN_CHECK_DATA {
29525    #[doc = "Latitude"]
29526    pub lat: i32,
29527    #[doc = "Longitude"]
29528    pub lon: i32,
29529}
29530impl TERRAIN_CHECK_DATA {
29531    pub const ENCODED_LEN: usize = 8usize;
29532    pub const DEFAULT: Self = Self {
29533        lat: 0_i32,
29534        lon: 0_i32,
29535    };
29536    #[cfg(feature = "arbitrary")]
29537    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29538        use arbitrary::{Arbitrary, Unstructured};
29539        let mut buf = [0u8; 1024];
29540        rng.fill_bytes(&mut buf);
29541        let mut unstructured = Unstructured::new(&buf);
29542        Self::arbitrary(&mut unstructured).unwrap_or_default()
29543    }
29544}
29545impl Default for TERRAIN_CHECK_DATA {
29546    fn default() -> Self {
29547        Self::DEFAULT.clone()
29548    }
29549}
29550impl MessageData for TERRAIN_CHECK_DATA {
29551    type Message = MavMessage;
29552    const ID: u32 = 135u32;
29553    const NAME: &'static str = "TERRAIN_CHECK";
29554    const EXTRA_CRC: u8 = 203u8;
29555    const ENCODED_LEN: usize = 8usize;
29556    fn deser(
29557        _version: MavlinkVersion,
29558        __input: &[u8],
29559    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29560        let avail_len = __input.len();
29561        let mut payload_buf = [0; Self::ENCODED_LEN];
29562        let mut buf = if avail_len < Self::ENCODED_LEN {
29563            payload_buf[0..avail_len].copy_from_slice(__input);
29564            Bytes::new(&payload_buf)
29565        } else {
29566            Bytes::new(__input)
29567        };
29568        let mut __struct = Self::default();
29569        __struct.lat = buf.get_i32_le();
29570        __struct.lon = buf.get_i32_le();
29571        Ok(__struct)
29572    }
29573    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29574        let mut __tmp = BytesMut::new(bytes);
29575        #[allow(clippy::absurd_extreme_comparisons)]
29576        #[allow(unused_comparisons)]
29577        if __tmp.remaining() < Self::ENCODED_LEN {
29578            panic!(
29579                "buffer is too small (need {} bytes, but got {})",
29580                Self::ENCODED_LEN,
29581                __tmp.remaining(),
29582            )
29583        }
29584        __tmp.put_i32_le(self.lat);
29585        __tmp.put_i32_le(self.lon);
29586        if matches!(version, MavlinkVersion::V2) {
29587            let len = __tmp.len();
29588            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29589        } else {
29590            __tmp.len()
29591        }
29592    }
29593}
29594#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29595#[doc = ""]
29596#[doc = "ID: 134"]
29597#[derive(Debug, Clone, PartialEq)]
29598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29600#[cfg_attr(feature = "ts", derive(TS))]
29601#[cfg_attr(feature = "ts", ts(export))]
29602pub struct TERRAIN_DATA_DATA {
29603    #[doc = "Latitude of SW corner of first grid"]
29604    pub lat: i32,
29605    #[doc = "Longitude of SW corner of first grid"]
29606    pub lon: i32,
29607    #[doc = "Grid spacing"]
29608    pub grid_spacing: u16,
29609    #[doc = "Terrain data MSL"]
29610    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29611    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29612    pub data: [i16; 16],
29613    #[doc = "bit within the terrain request mask"]
29614    pub gridbit: u8,
29615}
29616impl TERRAIN_DATA_DATA {
29617    pub const ENCODED_LEN: usize = 43usize;
29618    pub const DEFAULT: Self = Self {
29619        lat: 0_i32,
29620        lon: 0_i32,
29621        grid_spacing: 0_u16,
29622        data: [0_i16; 16usize],
29623        gridbit: 0_u8,
29624    };
29625    #[cfg(feature = "arbitrary")]
29626    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29627        use arbitrary::{Arbitrary, Unstructured};
29628        let mut buf = [0u8; 1024];
29629        rng.fill_bytes(&mut buf);
29630        let mut unstructured = Unstructured::new(&buf);
29631        Self::arbitrary(&mut unstructured).unwrap_or_default()
29632    }
29633}
29634impl Default for TERRAIN_DATA_DATA {
29635    fn default() -> Self {
29636        Self::DEFAULT.clone()
29637    }
29638}
29639impl MessageData for TERRAIN_DATA_DATA {
29640    type Message = MavMessage;
29641    const ID: u32 = 134u32;
29642    const NAME: &'static str = "TERRAIN_DATA";
29643    const EXTRA_CRC: u8 = 229u8;
29644    const ENCODED_LEN: usize = 43usize;
29645    fn deser(
29646        _version: MavlinkVersion,
29647        __input: &[u8],
29648    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29649        let avail_len = __input.len();
29650        let mut payload_buf = [0; Self::ENCODED_LEN];
29651        let mut buf = if avail_len < Self::ENCODED_LEN {
29652            payload_buf[0..avail_len].copy_from_slice(__input);
29653            Bytes::new(&payload_buf)
29654        } else {
29655            Bytes::new(__input)
29656        };
29657        let mut __struct = Self::default();
29658        __struct.lat = buf.get_i32_le();
29659        __struct.lon = buf.get_i32_le();
29660        __struct.grid_spacing = buf.get_u16_le();
29661        for v in &mut __struct.data {
29662            let val = buf.get_i16_le();
29663            *v = val;
29664        }
29665        __struct.gridbit = buf.get_u8();
29666        Ok(__struct)
29667    }
29668    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29669        let mut __tmp = BytesMut::new(bytes);
29670        #[allow(clippy::absurd_extreme_comparisons)]
29671        #[allow(unused_comparisons)]
29672        if __tmp.remaining() < Self::ENCODED_LEN {
29673            panic!(
29674                "buffer is too small (need {} bytes, but got {})",
29675                Self::ENCODED_LEN,
29676                __tmp.remaining(),
29677            )
29678        }
29679        __tmp.put_i32_le(self.lat);
29680        __tmp.put_i32_le(self.lon);
29681        __tmp.put_u16_le(self.grid_spacing);
29682        for val in &self.data {
29683            __tmp.put_i16_le(*val);
29684        }
29685        __tmp.put_u8(self.gridbit);
29686        if matches!(version, MavlinkVersion::V2) {
29687            let len = __tmp.len();
29688            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29689        } else {
29690            __tmp.len()
29691        }
29692    }
29693}
29694#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29695#[doc = ""]
29696#[doc = "ID: 136"]
29697#[derive(Debug, Clone, PartialEq)]
29698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29700#[cfg_attr(feature = "ts", derive(TS))]
29701#[cfg_attr(feature = "ts", ts(export))]
29702pub struct TERRAIN_REPORT_DATA {
29703    #[doc = "Latitude"]
29704    pub lat: i32,
29705    #[doc = "Longitude"]
29706    pub lon: i32,
29707    #[doc = "Terrain height MSL"]
29708    pub terrain_height: f32,
29709    #[doc = "Current vehicle height above lat/lon terrain height"]
29710    pub current_height: f32,
29711    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29712    pub spacing: u16,
29713    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29714    pub pending: u16,
29715    #[doc = "Number of 4x4 terrain blocks in memory"]
29716    pub loaded: u16,
29717}
29718impl TERRAIN_REPORT_DATA {
29719    pub const ENCODED_LEN: usize = 22usize;
29720    pub const DEFAULT: Self = Self {
29721        lat: 0_i32,
29722        lon: 0_i32,
29723        terrain_height: 0.0_f32,
29724        current_height: 0.0_f32,
29725        spacing: 0_u16,
29726        pending: 0_u16,
29727        loaded: 0_u16,
29728    };
29729    #[cfg(feature = "arbitrary")]
29730    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29731        use arbitrary::{Arbitrary, Unstructured};
29732        let mut buf = [0u8; 1024];
29733        rng.fill_bytes(&mut buf);
29734        let mut unstructured = Unstructured::new(&buf);
29735        Self::arbitrary(&mut unstructured).unwrap_or_default()
29736    }
29737}
29738impl Default for TERRAIN_REPORT_DATA {
29739    fn default() -> Self {
29740        Self::DEFAULT.clone()
29741    }
29742}
29743impl MessageData for TERRAIN_REPORT_DATA {
29744    type Message = MavMessage;
29745    const ID: u32 = 136u32;
29746    const NAME: &'static str = "TERRAIN_REPORT";
29747    const EXTRA_CRC: u8 = 1u8;
29748    const ENCODED_LEN: usize = 22usize;
29749    fn deser(
29750        _version: MavlinkVersion,
29751        __input: &[u8],
29752    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29753        let avail_len = __input.len();
29754        let mut payload_buf = [0; Self::ENCODED_LEN];
29755        let mut buf = if avail_len < Self::ENCODED_LEN {
29756            payload_buf[0..avail_len].copy_from_slice(__input);
29757            Bytes::new(&payload_buf)
29758        } else {
29759            Bytes::new(__input)
29760        };
29761        let mut __struct = Self::default();
29762        __struct.lat = buf.get_i32_le();
29763        __struct.lon = buf.get_i32_le();
29764        __struct.terrain_height = buf.get_f32_le();
29765        __struct.current_height = buf.get_f32_le();
29766        __struct.spacing = buf.get_u16_le();
29767        __struct.pending = buf.get_u16_le();
29768        __struct.loaded = buf.get_u16_le();
29769        Ok(__struct)
29770    }
29771    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29772        let mut __tmp = BytesMut::new(bytes);
29773        #[allow(clippy::absurd_extreme_comparisons)]
29774        #[allow(unused_comparisons)]
29775        if __tmp.remaining() < Self::ENCODED_LEN {
29776            panic!(
29777                "buffer is too small (need {} bytes, but got {})",
29778                Self::ENCODED_LEN,
29779                __tmp.remaining(),
29780            )
29781        }
29782        __tmp.put_i32_le(self.lat);
29783        __tmp.put_i32_le(self.lon);
29784        __tmp.put_f32_le(self.terrain_height);
29785        __tmp.put_f32_le(self.current_height);
29786        __tmp.put_u16_le(self.spacing);
29787        __tmp.put_u16_le(self.pending);
29788        __tmp.put_u16_le(self.loaded);
29789        if matches!(version, MavlinkVersion::V2) {
29790            let len = __tmp.len();
29791            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29792        } else {
29793            __tmp.len()
29794        }
29795    }
29796}
29797#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29798#[doc = ""]
29799#[doc = "ID: 133"]
29800#[derive(Debug, Clone, PartialEq)]
29801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29803#[cfg_attr(feature = "ts", derive(TS))]
29804#[cfg_attr(feature = "ts", ts(export))]
29805pub struct TERRAIN_REQUEST_DATA {
29806    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
29807    pub mask: u64,
29808    #[doc = "Latitude of SW corner of first grid"]
29809    pub lat: i32,
29810    #[doc = "Longitude of SW corner of first grid"]
29811    pub lon: i32,
29812    #[doc = "Grid spacing"]
29813    pub grid_spacing: u16,
29814}
29815impl TERRAIN_REQUEST_DATA {
29816    pub const ENCODED_LEN: usize = 18usize;
29817    pub const DEFAULT: Self = Self {
29818        mask: 0_u64,
29819        lat: 0_i32,
29820        lon: 0_i32,
29821        grid_spacing: 0_u16,
29822    };
29823    #[cfg(feature = "arbitrary")]
29824    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29825        use arbitrary::{Arbitrary, Unstructured};
29826        let mut buf = [0u8; 1024];
29827        rng.fill_bytes(&mut buf);
29828        let mut unstructured = Unstructured::new(&buf);
29829        Self::arbitrary(&mut unstructured).unwrap_or_default()
29830    }
29831}
29832impl Default for TERRAIN_REQUEST_DATA {
29833    fn default() -> Self {
29834        Self::DEFAULT.clone()
29835    }
29836}
29837impl MessageData for TERRAIN_REQUEST_DATA {
29838    type Message = MavMessage;
29839    const ID: u32 = 133u32;
29840    const NAME: &'static str = "TERRAIN_REQUEST";
29841    const EXTRA_CRC: u8 = 6u8;
29842    const ENCODED_LEN: usize = 18usize;
29843    fn deser(
29844        _version: MavlinkVersion,
29845        __input: &[u8],
29846    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29847        let avail_len = __input.len();
29848        let mut payload_buf = [0; Self::ENCODED_LEN];
29849        let mut buf = if avail_len < Self::ENCODED_LEN {
29850            payload_buf[0..avail_len].copy_from_slice(__input);
29851            Bytes::new(&payload_buf)
29852        } else {
29853            Bytes::new(__input)
29854        };
29855        let mut __struct = Self::default();
29856        __struct.mask = buf.get_u64_le();
29857        __struct.lat = buf.get_i32_le();
29858        __struct.lon = buf.get_i32_le();
29859        __struct.grid_spacing = buf.get_u16_le();
29860        Ok(__struct)
29861    }
29862    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29863        let mut __tmp = BytesMut::new(bytes);
29864        #[allow(clippy::absurd_extreme_comparisons)]
29865        #[allow(unused_comparisons)]
29866        if __tmp.remaining() < Self::ENCODED_LEN {
29867            panic!(
29868                "buffer is too small (need {} bytes, but got {})",
29869                Self::ENCODED_LEN,
29870                __tmp.remaining(),
29871            )
29872        }
29873        __tmp.put_u64_le(self.mask);
29874        __tmp.put_i32_le(self.lat);
29875        __tmp.put_i32_le(self.lon);
29876        __tmp.put_u16_le(self.grid_spacing);
29877        if matches!(version, MavlinkVersion::V2) {
29878            let len = __tmp.len();
29879            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29880        } else {
29881            __tmp.len()
29882        }
29883    }
29884}
29885#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
29886#[doc = ""]
29887#[doc = "ID: 111"]
29888#[derive(Debug, Clone, PartialEq)]
29889#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29891#[cfg_attr(feature = "ts", derive(TS))]
29892#[cfg_attr(feature = "ts", ts(export))]
29893pub struct TIMESYNC_DATA {
29894    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
29895    pub tc1: i64,
29896    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
29897    pub ts1: i64,
29898    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
29899    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29900    pub target_system: u8,
29901    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
29902    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29903    pub target_component: u8,
29904}
29905impl TIMESYNC_DATA {
29906    pub const ENCODED_LEN: usize = 18usize;
29907    pub const DEFAULT: Self = Self {
29908        tc1: 0_i64,
29909        ts1: 0_i64,
29910        target_system: 0_u8,
29911        target_component: 0_u8,
29912    };
29913    #[cfg(feature = "arbitrary")]
29914    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29915        use arbitrary::{Arbitrary, Unstructured};
29916        let mut buf = [0u8; 1024];
29917        rng.fill_bytes(&mut buf);
29918        let mut unstructured = Unstructured::new(&buf);
29919        Self::arbitrary(&mut unstructured).unwrap_or_default()
29920    }
29921}
29922impl Default for TIMESYNC_DATA {
29923    fn default() -> Self {
29924        Self::DEFAULT.clone()
29925    }
29926}
29927impl MessageData for TIMESYNC_DATA {
29928    type Message = MavMessage;
29929    const ID: u32 = 111u32;
29930    const NAME: &'static str = "TIMESYNC";
29931    const EXTRA_CRC: u8 = 34u8;
29932    const ENCODED_LEN: usize = 18usize;
29933    fn deser(
29934        _version: MavlinkVersion,
29935        __input: &[u8],
29936    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29937        let avail_len = __input.len();
29938        let mut payload_buf = [0; Self::ENCODED_LEN];
29939        let mut buf = if avail_len < Self::ENCODED_LEN {
29940            payload_buf[0..avail_len].copy_from_slice(__input);
29941            Bytes::new(&payload_buf)
29942        } else {
29943            Bytes::new(__input)
29944        };
29945        let mut __struct = Self::default();
29946        __struct.tc1 = buf.get_i64_le();
29947        __struct.ts1 = buf.get_i64_le();
29948        __struct.target_system = buf.get_u8();
29949        __struct.target_component = buf.get_u8();
29950        Ok(__struct)
29951    }
29952    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29953        let mut __tmp = BytesMut::new(bytes);
29954        #[allow(clippy::absurd_extreme_comparisons)]
29955        #[allow(unused_comparisons)]
29956        if __tmp.remaining() < Self::ENCODED_LEN {
29957            panic!(
29958                "buffer is too small (need {} bytes, but got {})",
29959                Self::ENCODED_LEN,
29960                __tmp.remaining(),
29961            )
29962        }
29963        __tmp.put_i64_le(self.tc1);
29964        __tmp.put_i64_le(self.ts1);
29965        if matches!(version, MavlinkVersion::V2) {
29966            __tmp.put_u8(self.target_system);
29967            __tmp.put_u8(self.target_component);
29968            let len = __tmp.len();
29969            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29970        } else {
29971            __tmp.len()
29972        }
29973    }
29974}
29975#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
29976#[doc = ""]
29977#[doc = "ID: 380"]
29978#[derive(Debug, Clone, PartialEq)]
29979#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29980#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29981#[cfg_attr(feature = "ts", derive(TS))]
29982#[cfg_attr(feature = "ts", ts(export))]
29983pub struct TIME_ESTIMATE_TO_TARGET_DATA {
29984    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
29985    pub safe_return: i32,
29986    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
29987    pub land: i32,
29988    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
29989    pub mission_next_item: i32,
29990    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
29991    pub mission_end: i32,
29992    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
29993    pub commanded_action: i32,
29994}
29995impl TIME_ESTIMATE_TO_TARGET_DATA {
29996    pub const ENCODED_LEN: usize = 20usize;
29997    pub const DEFAULT: Self = Self {
29998        safe_return: 0_i32,
29999        land: 0_i32,
30000        mission_next_item: 0_i32,
30001        mission_end: 0_i32,
30002        commanded_action: 0_i32,
30003    };
30004    #[cfg(feature = "arbitrary")]
30005    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30006        use arbitrary::{Arbitrary, Unstructured};
30007        let mut buf = [0u8; 1024];
30008        rng.fill_bytes(&mut buf);
30009        let mut unstructured = Unstructured::new(&buf);
30010        Self::arbitrary(&mut unstructured).unwrap_or_default()
30011    }
30012}
30013impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
30014    fn default() -> Self {
30015        Self::DEFAULT.clone()
30016    }
30017}
30018impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
30019    type Message = MavMessage;
30020    const ID: u32 = 380u32;
30021    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
30022    const EXTRA_CRC: u8 = 232u8;
30023    const ENCODED_LEN: usize = 20usize;
30024    fn deser(
30025        _version: MavlinkVersion,
30026        __input: &[u8],
30027    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30028        let avail_len = __input.len();
30029        let mut payload_buf = [0; Self::ENCODED_LEN];
30030        let mut buf = if avail_len < Self::ENCODED_LEN {
30031            payload_buf[0..avail_len].copy_from_slice(__input);
30032            Bytes::new(&payload_buf)
30033        } else {
30034            Bytes::new(__input)
30035        };
30036        let mut __struct = Self::default();
30037        __struct.safe_return = buf.get_i32_le();
30038        __struct.land = buf.get_i32_le();
30039        __struct.mission_next_item = buf.get_i32_le();
30040        __struct.mission_end = buf.get_i32_le();
30041        __struct.commanded_action = buf.get_i32_le();
30042        Ok(__struct)
30043    }
30044    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30045        let mut __tmp = BytesMut::new(bytes);
30046        #[allow(clippy::absurd_extreme_comparisons)]
30047        #[allow(unused_comparisons)]
30048        if __tmp.remaining() < Self::ENCODED_LEN {
30049            panic!(
30050                "buffer is too small (need {} bytes, but got {})",
30051                Self::ENCODED_LEN,
30052                __tmp.remaining(),
30053            )
30054        }
30055        __tmp.put_i32_le(self.safe_return);
30056        __tmp.put_i32_le(self.land);
30057        __tmp.put_i32_le(self.mission_next_item);
30058        __tmp.put_i32_le(self.mission_end);
30059        __tmp.put_i32_le(self.commanded_action);
30060        if matches!(version, MavlinkVersion::V2) {
30061            let len = __tmp.len();
30062            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30063        } else {
30064            __tmp.len()
30065        }
30066    }
30067}
30068#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
30069#[doc = ""]
30070#[doc = "ID: 333"]
30071#[derive(Debug, Clone, PartialEq)]
30072#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30073#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30074#[cfg_attr(feature = "ts", derive(TS))]
30075#[cfg_attr(feature = "ts", ts(export))]
30076pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30077    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30078    pub time_usec: u64,
30079    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
30080    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30081    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30082    pub pos_x: [f32; 5],
30083    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
30084    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30085    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30086    pub pos_y: [f32; 5],
30087    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
30088    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30089    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30090    pub pos_z: [f32; 5],
30091    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
30092    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30093    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30094    pub delta: [f32; 5],
30095    #[doc = "Yaw. Set to NaN for unchanged"]
30096    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30097    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30098    pub pos_yaw: [f32; 5],
30099    #[doc = "Number of valid control points (up-to 5 points are possible)"]
30100    pub valid_points: u8,
30101}
30102impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30103    pub const ENCODED_LEN: usize = 109usize;
30104    pub const DEFAULT: Self = Self {
30105        time_usec: 0_u64,
30106        pos_x: [0.0_f32; 5usize],
30107        pos_y: [0.0_f32; 5usize],
30108        pos_z: [0.0_f32; 5usize],
30109        delta: [0.0_f32; 5usize],
30110        pos_yaw: [0.0_f32; 5usize],
30111        valid_points: 0_u8,
30112    };
30113    #[cfg(feature = "arbitrary")]
30114    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30115        use arbitrary::{Arbitrary, Unstructured};
30116        let mut buf = [0u8; 1024];
30117        rng.fill_bytes(&mut buf);
30118        let mut unstructured = Unstructured::new(&buf);
30119        Self::arbitrary(&mut unstructured).unwrap_or_default()
30120    }
30121}
30122impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30123    fn default() -> Self {
30124        Self::DEFAULT.clone()
30125    }
30126}
30127impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30128    type Message = MavMessage;
30129    const ID: u32 = 333u32;
30130    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
30131    const EXTRA_CRC: u8 = 231u8;
30132    const ENCODED_LEN: usize = 109usize;
30133    fn deser(
30134        _version: MavlinkVersion,
30135        __input: &[u8],
30136    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30137        let avail_len = __input.len();
30138        let mut payload_buf = [0; Self::ENCODED_LEN];
30139        let mut buf = if avail_len < Self::ENCODED_LEN {
30140            payload_buf[0..avail_len].copy_from_slice(__input);
30141            Bytes::new(&payload_buf)
30142        } else {
30143            Bytes::new(__input)
30144        };
30145        let mut __struct = Self::default();
30146        __struct.time_usec = buf.get_u64_le();
30147        for v in &mut __struct.pos_x {
30148            let val = buf.get_f32_le();
30149            *v = val;
30150        }
30151        for v in &mut __struct.pos_y {
30152            let val = buf.get_f32_le();
30153            *v = val;
30154        }
30155        for v in &mut __struct.pos_z {
30156            let val = buf.get_f32_le();
30157            *v = val;
30158        }
30159        for v in &mut __struct.delta {
30160            let val = buf.get_f32_le();
30161            *v = val;
30162        }
30163        for v in &mut __struct.pos_yaw {
30164            let val = buf.get_f32_le();
30165            *v = val;
30166        }
30167        __struct.valid_points = buf.get_u8();
30168        Ok(__struct)
30169    }
30170    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30171        let mut __tmp = BytesMut::new(bytes);
30172        #[allow(clippy::absurd_extreme_comparisons)]
30173        #[allow(unused_comparisons)]
30174        if __tmp.remaining() < Self::ENCODED_LEN {
30175            panic!(
30176                "buffer is too small (need {} bytes, but got {})",
30177                Self::ENCODED_LEN,
30178                __tmp.remaining(),
30179            )
30180        }
30181        __tmp.put_u64_le(self.time_usec);
30182        for val in &self.pos_x {
30183            __tmp.put_f32_le(*val);
30184        }
30185        for val in &self.pos_y {
30186            __tmp.put_f32_le(*val);
30187        }
30188        for val in &self.pos_z {
30189            __tmp.put_f32_le(*val);
30190        }
30191        for val in &self.delta {
30192            __tmp.put_f32_le(*val);
30193        }
30194        for val in &self.pos_yaw {
30195            __tmp.put_f32_le(*val);
30196        }
30197        __tmp.put_u8(self.valid_points);
30198        if matches!(version, MavlinkVersion::V2) {
30199            let len = __tmp.len();
30200            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30201        } else {
30202            __tmp.len()
30203        }
30204    }
30205}
30206#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
30207#[doc = ""]
30208#[doc = "ID: 332"]
30209#[derive(Debug, Clone, PartialEq)]
30210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30211#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30212#[cfg_attr(feature = "ts", derive(TS))]
30213#[cfg_attr(feature = "ts", ts(export))]
30214pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30215    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30216    pub time_usec: u64,
30217    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
30218    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30219    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30220    pub pos_x: [f32; 5],
30221    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
30222    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30223    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30224    pub pos_y: [f32; 5],
30225    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
30226    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30227    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30228    pub pos_z: [f32; 5],
30229    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
30230    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30231    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30232    pub vel_x: [f32; 5],
30233    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30234    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30235    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30236    pub vel_y: [f32; 5],
30237    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30238    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30239    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30240    pub vel_z: [f32; 5],
30241    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30242    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30243    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30244    pub acc_x: [f32; 5],
30245    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30246    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30247    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30248    pub acc_y: [f32; 5],
30249    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30250    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30251    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30252    pub acc_z: [f32; 5],
30253    #[doc = "Yaw angle, set to NaN if not being used"]
30254    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30255    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30256    pub pos_yaw: [f32; 5],
30257    #[doc = "Yaw rate, set to NaN if not being used"]
30258    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30259    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30260    pub vel_yaw: [f32; 5],
30261    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30262    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30263    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30264    pub command: [u16; 5],
30265    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30266    pub valid_points: u8,
30267}
30268impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30269    pub const ENCODED_LEN: usize = 239usize;
30270    pub const DEFAULT: Self = Self {
30271        time_usec: 0_u64,
30272        pos_x: [0.0_f32; 5usize],
30273        pos_y: [0.0_f32; 5usize],
30274        pos_z: [0.0_f32; 5usize],
30275        vel_x: [0.0_f32; 5usize],
30276        vel_y: [0.0_f32; 5usize],
30277        vel_z: [0.0_f32; 5usize],
30278        acc_x: [0.0_f32; 5usize],
30279        acc_y: [0.0_f32; 5usize],
30280        acc_z: [0.0_f32; 5usize],
30281        pos_yaw: [0.0_f32; 5usize],
30282        vel_yaw: [0.0_f32; 5usize],
30283        command: [0_u16; 5usize],
30284        valid_points: 0_u8,
30285    };
30286    #[cfg(feature = "arbitrary")]
30287    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30288        use arbitrary::{Arbitrary, Unstructured};
30289        let mut buf = [0u8; 1024];
30290        rng.fill_bytes(&mut buf);
30291        let mut unstructured = Unstructured::new(&buf);
30292        Self::arbitrary(&mut unstructured).unwrap_or_default()
30293    }
30294}
30295impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30296    fn default() -> Self {
30297        Self::DEFAULT.clone()
30298    }
30299}
30300impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30301    type Message = MavMessage;
30302    const ID: u32 = 332u32;
30303    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30304    const EXTRA_CRC: u8 = 236u8;
30305    const ENCODED_LEN: usize = 239usize;
30306    fn deser(
30307        _version: MavlinkVersion,
30308        __input: &[u8],
30309    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30310        let avail_len = __input.len();
30311        let mut payload_buf = [0; Self::ENCODED_LEN];
30312        let mut buf = if avail_len < Self::ENCODED_LEN {
30313            payload_buf[0..avail_len].copy_from_slice(__input);
30314            Bytes::new(&payload_buf)
30315        } else {
30316            Bytes::new(__input)
30317        };
30318        let mut __struct = Self::default();
30319        __struct.time_usec = buf.get_u64_le();
30320        for v in &mut __struct.pos_x {
30321            let val = buf.get_f32_le();
30322            *v = val;
30323        }
30324        for v in &mut __struct.pos_y {
30325            let val = buf.get_f32_le();
30326            *v = val;
30327        }
30328        for v in &mut __struct.pos_z {
30329            let val = buf.get_f32_le();
30330            *v = val;
30331        }
30332        for v in &mut __struct.vel_x {
30333            let val = buf.get_f32_le();
30334            *v = val;
30335        }
30336        for v in &mut __struct.vel_y {
30337            let val = buf.get_f32_le();
30338            *v = val;
30339        }
30340        for v in &mut __struct.vel_z {
30341            let val = buf.get_f32_le();
30342            *v = val;
30343        }
30344        for v in &mut __struct.acc_x {
30345            let val = buf.get_f32_le();
30346            *v = val;
30347        }
30348        for v in &mut __struct.acc_y {
30349            let val = buf.get_f32_le();
30350            *v = val;
30351        }
30352        for v in &mut __struct.acc_z {
30353            let val = buf.get_f32_le();
30354            *v = val;
30355        }
30356        for v in &mut __struct.pos_yaw {
30357            let val = buf.get_f32_le();
30358            *v = val;
30359        }
30360        for v in &mut __struct.vel_yaw {
30361            let val = buf.get_f32_le();
30362            *v = val;
30363        }
30364        for v in &mut __struct.command {
30365            let val = buf.get_u16_le();
30366            *v = val;
30367        }
30368        __struct.valid_points = buf.get_u8();
30369        Ok(__struct)
30370    }
30371    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30372        let mut __tmp = BytesMut::new(bytes);
30373        #[allow(clippy::absurd_extreme_comparisons)]
30374        #[allow(unused_comparisons)]
30375        if __tmp.remaining() < Self::ENCODED_LEN {
30376            panic!(
30377                "buffer is too small (need {} bytes, but got {})",
30378                Self::ENCODED_LEN,
30379                __tmp.remaining(),
30380            )
30381        }
30382        __tmp.put_u64_le(self.time_usec);
30383        for val in &self.pos_x {
30384            __tmp.put_f32_le(*val);
30385        }
30386        for val in &self.pos_y {
30387            __tmp.put_f32_le(*val);
30388        }
30389        for val in &self.pos_z {
30390            __tmp.put_f32_le(*val);
30391        }
30392        for val in &self.vel_x {
30393            __tmp.put_f32_le(*val);
30394        }
30395        for val in &self.vel_y {
30396            __tmp.put_f32_le(*val);
30397        }
30398        for val in &self.vel_z {
30399            __tmp.put_f32_le(*val);
30400        }
30401        for val in &self.acc_x {
30402            __tmp.put_f32_le(*val);
30403        }
30404        for val in &self.acc_y {
30405            __tmp.put_f32_le(*val);
30406        }
30407        for val in &self.acc_z {
30408            __tmp.put_f32_le(*val);
30409        }
30410        for val in &self.pos_yaw {
30411            __tmp.put_f32_le(*val);
30412        }
30413        for val in &self.vel_yaw {
30414            __tmp.put_f32_le(*val);
30415        }
30416        for val in &self.command {
30417            __tmp.put_u16_le(*val);
30418        }
30419        __tmp.put_u8(self.valid_points);
30420        if matches!(version, MavlinkVersion::V2) {
30421            let len = __tmp.len();
30422            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30423        } else {
30424            __tmp.len()
30425        }
30426    }
30427}
30428#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30429#[doc = ""]
30430#[doc = "ID: 385"]
30431#[derive(Debug, Clone, PartialEq)]
30432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30434#[cfg_attr(feature = "ts", derive(TS))]
30435#[cfg_attr(feature = "ts", ts(export))]
30436pub struct TUNNEL_DATA {
30437    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30438    pub payload_type: MavTunnelPayloadType,
30439    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30440    pub target_system: u8,
30441    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30442    pub target_component: u8,
30443    #[doc = "Length of the data transported in payload"]
30444    pub payload_length: u8,
30445    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30446    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30447    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30448    pub payload: [u8; 128],
30449}
30450impl TUNNEL_DATA {
30451    pub const ENCODED_LEN: usize = 133usize;
30452    pub const DEFAULT: Self = Self {
30453        payload_type: MavTunnelPayloadType::DEFAULT,
30454        target_system: 0_u8,
30455        target_component: 0_u8,
30456        payload_length: 0_u8,
30457        payload: [0_u8; 128usize],
30458    };
30459    #[cfg(feature = "arbitrary")]
30460    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30461        use arbitrary::{Arbitrary, Unstructured};
30462        let mut buf = [0u8; 1024];
30463        rng.fill_bytes(&mut buf);
30464        let mut unstructured = Unstructured::new(&buf);
30465        Self::arbitrary(&mut unstructured).unwrap_or_default()
30466    }
30467}
30468impl Default for TUNNEL_DATA {
30469    fn default() -> Self {
30470        Self::DEFAULT.clone()
30471    }
30472}
30473impl MessageData for TUNNEL_DATA {
30474    type Message = MavMessage;
30475    const ID: u32 = 385u32;
30476    const NAME: &'static str = "TUNNEL";
30477    const EXTRA_CRC: u8 = 147u8;
30478    const ENCODED_LEN: usize = 133usize;
30479    fn deser(
30480        _version: MavlinkVersion,
30481        __input: &[u8],
30482    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30483        let avail_len = __input.len();
30484        let mut payload_buf = [0; Self::ENCODED_LEN];
30485        let mut buf = if avail_len < Self::ENCODED_LEN {
30486            payload_buf[0..avail_len].copy_from_slice(__input);
30487            Bytes::new(&payload_buf)
30488        } else {
30489            Bytes::new(__input)
30490        };
30491        let mut __struct = Self::default();
30492        let tmp = buf.get_u16_le();
30493        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30494            ::mavlink_core::error::ParserError::InvalidEnum {
30495                enum_type: "MavTunnelPayloadType",
30496                value: tmp as u64,
30497            },
30498        )?;
30499        __struct.target_system = buf.get_u8();
30500        __struct.target_component = buf.get_u8();
30501        __struct.payload_length = buf.get_u8();
30502        for v in &mut __struct.payload {
30503            let val = buf.get_u8();
30504            *v = val;
30505        }
30506        Ok(__struct)
30507    }
30508    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30509        let mut __tmp = BytesMut::new(bytes);
30510        #[allow(clippy::absurd_extreme_comparisons)]
30511        #[allow(unused_comparisons)]
30512        if __tmp.remaining() < Self::ENCODED_LEN {
30513            panic!(
30514                "buffer is too small (need {} bytes, but got {})",
30515                Self::ENCODED_LEN,
30516                __tmp.remaining(),
30517            )
30518        }
30519        __tmp.put_u16_le(self.payload_type as u16);
30520        __tmp.put_u8(self.target_system);
30521        __tmp.put_u8(self.target_component);
30522        __tmp.put_u8(self.payload_length);
30523        for val in &self.payload {
30524            __tmp.put_u8(*val);
30525        }
30526        if matches!(version, MavlinkVersion::V2) {
30527            let len = __tmp.len();
30528            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30529        } else {
30530            __tmp.len()
30531        }
30532    }
30533}
30534#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30535#[doc = ""]
30536#[doc = "ID: 311"]
30537#[derive(Debug, Clone, PartialEq)]
30538#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30539#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30540#[cfg_attr(feature = "ts", derive(TS))]
30541#[cfg_attr(feature = "ts", ts(export))]
30542pub struct UAVCAN_NODE_INFO_DATA {
30543    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30544    pub time_usec: u64,
30545    #[doc = "Time since the start-up of the node."]
30546    pub uptime_sec: u32,
30547    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30548    pub sw_vcs_commit: u32,
30549    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30550    #[cfg_attr(feature = "ts", ts(type = "string"))]
30551    pub name: CharArray<80>,
30552    #[doc = "Hardware major version number."]
30553    pub hw_version_major: u8,
30554    #[doc = "Hardware minor version number."]
30555    pub hw_version_minor: u8,
30556    #[doc = "Hardware unique 128-bit ID."]
30557    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30558    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30559    pub hw_unique_id: [u8; 16],
30560    #[doc = "Software major version number."]
30561    pub sw_version_major: u8,
30562    #[doc = "Software minor version number."]
30563    pub sw_version_minor: u8,
30564}
30565impl UAVCAN_NODE_INFO_DATA {
30566    pub const ENCODED_LEN: usize = 116usize;
30567    pub const DEFAULT: Self = Self {
30568        time_usec: 0_u64,
30569        uptime_sec: 0_u32,
30570        sw_vcs_commit: 0_u32,
30571        name: CharArray::new([0_u8; 80usize]),
30572        hw_version_major: 0_u8,
30573        hw_version_minor: 0_u8,
30574        hw_unique_id: [0_u8; 16usize],
30575        sw_version_major: 0_u8,
30576        sw_version_minor: 0_u8,
30577    };
30578    #[cfg(feature = "arbitrary")]
30579    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30580        use arbitrary::{Arbitrary, Unstructured};
30581        let mut buf = [0u8; 1024];
30582        rng.fill_bytes(&mut buf);
30583        let mut unstructured = Unstructured::new(&buf);
30584        Self::arbitrary(&mut unstructured).unwrap_or_default()
30585    }
30586}
30587impl Default for UAVCAN_NODE_INFO_DATA {
30588    fn default() -> Self {
30589        Self::DEFAULT.clone()
30590    }
30591}
30592impl MessageData for UAVCAN_NODE_INFO_DATA {
30593    type Message = MavMessage;
30594    const ID: u32 = 311u32;
30595    const NAME: &'static str = "UAVCAN_NODE_INFO";
30596    const EXTRA_CRC: u8 = 95u8;
30597    const ENCODED_LEN: usize = 116usize;
30598    fn deser(
30599        _version: MavlinkVersion,
30600        __input: &[u8],
30601    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30602        let avail_len = __input.len();
30603        let mut payload_buf = [0; Self::ENCODED_LEN];
30604        let mut buf = if avail_len < Self::ENCODED_LEN {
30605            payload_buf[0..avail_len].copy_from_slice(__input);
30606            Bytes::new(&payload_buf)
30607        } else {
30608            Bytes::new(__input)
30609        };
30610        let mut __struct = Self::default();
30611        __struct.time_usec = buf.get_u64_le();
30612        __struct.uptime_sec = buf.get_u32_le();
30613        __struct.sw_vcs_commit = buf.get_u32_le();
30614        let mut tmp = [0_u8; 80usize];
30615        for v in &mut tmp {
30616            *v = buf.get_u8();
30617        }
30618        __struct.name = CharArray::new(tmp);
30619        __struct.hw_version_major = buf.get_u8();
30620        __struct.hw_version_minor = buf.get_u8();
30621        for v in &mut __struct.hw_unique_id {
30622            let val = buf.get_u8();
30623            *v = val;
30624        }
30625        __struct.sw_version_major = buf.get_u8();
30626        __struct.sw_version_minor = buf.get_u8();
30627        Ok(__struct)
30628    }
30629    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30630        let mut __tmp = BytesMut::new(bytes);
30631        #[allow(clippy::absurd_extreme_comparisons)]
30632        #[allow(unused_comparisons)]
30633        if __tmp.remaining() < Self::ENCODED_LEN {
30634            panic!(
30635                "buffer is too small (need {} bytes, but got {})",
30636                Self::ENCODED_LEN,
30637                __tmp.remaining(),
30638            )
30639        }
30640        __tmp.put_u64_le(self.time_usec);
30641        __tmp.put_u32_le(self.uptime_sec);
30642        __tmp.put_u32_le(self.sw_vcs_commit);
30643        for val in &self.name {
30644            __tmp.put_u8(*val);
30645        }
30646        __tmp.put_u8(self.hw_version_major);
30647        __tmp.put_u8(self.hw_version_minor);
30648        for val in &self.hw_unique_id {
30649            __tmp.put_u8(*val);
30650        }
30651        __tmp.put_u8(self.sw_version_major);
30652        __tmp.put_u8(self.sw_version_minor);
30653        if matches!(version, MavlinkVersion::V2) {
30654            let len = __tmp.len();
30655            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30656        } else {
30657            __tmp.len()
30658        }
30659    }
30660}
30661#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30662#[doc = ""]
30663#[doc = "ID: 310"]
30664#[derive(Debug, Clone, PartialEq)]
30665#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30666#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30667#[cfg_attr(feature = "ts", derive(TS))]
30668#[cfg_attr(feature = "ts", ts(export))]
30669pub struct UAVCAN_NODE_STATUS_DATA {
30670    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30671    pub time_usec: u64,
30672    #[doc = "Time since the start-up of the node."]
30673    pub uptime_sec: u32,
30674    #[doc = "Vendor-specific status information."]
30675    pub vendor_specific_status_code: u16,
30676    #[doc = "Generalized node health status."]
30677    pub health: UavcanNodeHealth,
30678    #[doc = "Generalized operating mode."]
30679    pub mode: UavcanNodeMode,
30680    #[doc = "Not used currently."]
30681    pub sub_mode: u8,
30682}
30683impl UAVCAN_NODE_STATUS_DATA {
30684    pub const ENCODED_LEN: usize = 17usize;
30685    pub const DEFAULT: Self = Self {
30686        time_usec: 0_u64,
30687        uptime_sec: 0_u32,
30688        vendor_specific_status_code: 0_u16,
30689        health: UavcanNodeHealth::DEFAULT,
30690        mode: UavcanNodeMode::DEFAULT,
30691        sub_mode: 0_u8,
30692    };
30693    #[cfg(feature = "arbitrary")]
30694    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30695        use arbitrary::{Arbitrary, Unstructured};
30696        let mut buf = [0u8; 1024];
30697        rng.fill_bytes(&mut buf);
30698        let mut unstructured = Unstructured::new(&buf);
30699        Self::arbitrary(&mut unstructured).unwrap_or_default()
30700    }
30701}
30702impl Default for UAVCAN_NODE_STATUS_DATA {
30703    fn default() -> Self {
30704        Self::DEFAULT.clone()
30705    }
30706}
30707impl MessageData for UAVCAN_NODE_STATUS_DATA {
30708    type Message = MavMessage;
30709    const ID: u32 = 310u32;
30710    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30711    const EXTRA_CRC: u8 = 28u8;
30712    const ENCODED_LEN: usize = 17usize;
30713    fn deser(
30714        _version: MavlinkVersion,
30715        __input: &[u8],
30716    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30717        let avail_len = __input.len();
30718        let mut payload_buf = [0; Self::ENCODED_LEN];
30719        let mut buf = if avail_len < Self::ENCODED_LEN {
30720            payload_buf[0..avail_len].copy_from_slice(__input);
30721            Bytes::new(&payload_buf)
30722        } else {
30723            Bytes::new(__input)
30724        };
30725        let mut __struct = Self::default();
30726        __struct.time_usec = buf.get_u64_le();
30727        __struct.uptime_sec = buf.get_u32_le();
30728        __struct.vendor_specific_status_code = buf.get_u16_le();
30729        let tmp = buf.get_u8();
30730        __struct.health =
30731            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30732                enum_type: "UavcanNodeHealth",
30733                value: tmp as u64,
30734            })?;
30735        let tmp = buf.get_u8();
30736        __struct.mode =
30737            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30738                enum_type: "UavcanNodeMode",
30739                value: tmp as u64,
30740            })?;
30741        __struct.sub_mode = buf.get_u8();
30742        Ok(__struct)
30743    }
30744    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30745        let mut __tmp = BytesMut::new(bytes);
30746        #[allow(clippy::absurd_extreme_comparisons)]
30747        #[allow(unused_comparisons)]
30748        if __tmp.remaining() < Self::ENCODED_LEN {
30749            panic!(
30750                "buffer is too small (need {} bytes, but got {})",
30751                Self::ENCODED_LEN,
30752                __tmp.remaining(),
30753            )
30754        }
30755        __tmp.put_u64_le(self.time_usec);
30756        __tmp.put_u32_le(self.uptime_sec);
30757        __tmp.put_u16_le(self.vendor_specific_status_code);
30758        __tmp.put_u8(self.health as u8);
30759        __tmp.put_u8(self.mode as u8);
30760        __tmp.put_u8(self.sub_mode);
30761        if matches!(version, MavlinkVersion::V2) {
30762            let len = __tmp.len();
30763            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30764        } else {
30765            __tmp.len()
30766        }
30767    }
30768}
30769#[doc = "Request messages."]
30770#[doc = ""]
30771#[doc = "ID: 10006"]
30772#[derive(Debug, Clone, PartialEq)]
30773#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30774#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30775#[cfg_attr(feature = "ts", derive(TS))]
30776#[cfg_attr(feature = "ts", ts(export))]
30777pub struct UAVIONIX_ADSB_GET_DATA {
30778    #[doc = "Message ID to request. Supports any message in this 10000-10099 range"]
30779    pub ReqMessageId: u32,
30780}
30781impl UAVIONIX_ADSB_GET_DATA {
30782    pub const ENCODED_LEN: usize = 4usize;
30783    pub const DEFAULT: Self = Self {
30784        ReqMessageId: 0_u32,
30785    };
30786    #[cfg(feature = "arbitrary")]
30787    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30788        use arbitrary::{Arbitrary, Unstructured};
30789        let mut buf = [0u8; 1024];
30790        rng.fill_bytes(&mut buf);
30791        let mut unstructured = Unstructured::new(&buf);
30792        Self::arbitrary(&mut unstructured).unwrap_or_default()
30793    }
30794}
30795impl Default for UAVIONIX_ADSB_GET_DATA {
30796    fn default() -> Self {
30797        Self::DEFAULT.clone()
30798    }
30799}
30800impl MessageData for UAVIONIX_ADSB_GET_DATA {
30801    type Message = MavMessage;
30802    const ID: u32 = 10006u32;
30803    const NAME: &'static str = "UAVIONIX_ADSB_GET";
30804    const EXTRA_CRC: u8 = 193u8;
30805    const ENCODED_LEN: usize = 4usize;
30806    fn deser(
30807        _version: MavlinkVersion,
30808        __input: &[u8],
30809    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30810        let avail_len = __input.len();
30811        let mut payload_buf = [0; Self::ENCODED_LEN];
30812        let mut buf = if avail_len < Self::ENCODED_LEN {
30813            payload_buf[0..avail_len].copy_from_slice(__input);
30814            Bytes::new(&payload_buf)
30815        } else {
30816            Bytes::new(__input)
30817        };
30818        let mut __struct = Self::default();
30819        __struct.ReqMessageId = buf.get_u32_le();
30820        Ok(__struct)
30821    }
30822    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30823        let mut __tmp = BytesMut::new(bytes);
30824        #[allow(clippy::absurd_extreme_comparisons)]
30825        #[allow(unused_comparisons)]
30826        if __tmp.remaining() < Self::ENCODED_LEN {
30827            panic!(
30828                "buffer is too small (need {} bytes, but got {})",
30829                Self::ENCODED_LEN,
30830                __tmp.remaining(),
30831            )
30832        }
30833        __tmp.put_u32_le(self.ReqMessageId);
30834        if matches!(version, MavlinkVersion::V2) {
30835            let len = __tmp.len();
30836            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30837        } else {
30838            __tmp.len()
30839        }
30840    }
30841}
30842#[doc = "Static data to configure the ADS-B transponder (send within 10 sec of a POR and every 10 sec thereafter)."]
30843#[doc = ""]
30844#[doc = "ID: 10001"]
30845#[derive(Debug, Clone, PartialEq)]
30846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30847#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30848#[cfg_attr(feature = "ts", derive(TS))]
30849#[cfg_attr(feature = "ts", ts(export))]
30850pub struct UAVIONIX_ADSB_OUT_CFG_DATA {
30851    #[doc = "Vehicle address (24 bit)"]
30852    pub ICAO: u32,
30853    #[doc = "Aircraft stall speed in cm/s"]
30854    pub stallSpeed: u16,
30855    #[doc = "Vehicle identifier (8 characters, null terminated, valid characters are A-Z, 0-9, \" \" only)"]
30856    #[cfg_attr(feature = "ts", ts(type = "string"))]
30857    pub callsign: CharArray<9>,
30858    #[doc = "Transmitting vehicle type. See ADSB_EMITTER_TYPE enum"]
30859    pub emitterType: AdsbEmitterType,
30860    #[doc = "Aircraft length and width encoding (table 2-35 of DO-282B)"]
30861    pub aircraftSize: UavionixAdsbOutCfgAircraftSize,
30862    #[doc = "GPS antenna lateral offset (table 2-36 of DO-282B)"]
30863    pub gpsOffsetLat: UavionixAdsbOutCfgGpsOffsetLat,
30864    #[doc = "GPS antenna longitudinal offset from nose [if non-zero, take position (in meters) divide by 2 and add one] (table 2-37 DO-282B)"]
30865    pub gpsOffsetLon: UavionixAdsbOutCfgGpsOffsetLon,
30866    #[doc = "ADS-B transponder reciever and transmit enable flags"]
30867    pub rfSelect: UavionixAdsbOutRfSelect,
30868}
30869impl UAVIONIX_ADSB_OUT_CFG_DATA {
30870    pub const ENCODED_LEN: usize = 20usize;
30871    pub const DEFAULT: Self = Self {
30872        ICAO: 0_u32,
30873        stallSpeed: 0_u16,
30874        callsign: CharArray::new([0_u8; 9usize]),
30875        emitterType: AdsbEmitterType::DEFAULT,
30876        aircraftSize: UavionixAdsbOutCfgAircraftSize::DEFAULT,
30877        gpsOffsetLat: UavionixAdsbOutCfgGpsOffsetLat::DEFAULT,
30878        gpsOffsetLon: UavionixAdsbOutCfgGpsOffsetLon::DEFAULT,
30879        rfSelect: UavionixAdsbOutRfSelect::DEFAULT,
30880    };
30881    #[cfg(feature = "arbitrary")]
30882    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30883        use arbitrary::{Arbitrary, Unstructured};
30884        let mut buf = [0u8; 1024];
30885        rng.fill_bytes(&mut buf);
30886        let mut unstructured = Unstructured::new(&buf);
30887        Self::arbitrary(&mut unstructured).unwrap_or_default()
30888    }
30889}
30890impl Default for UAVIONIX_ADSB_OUT_CFG_DATA {
30891    fn default() -> Self {
30892        Self::DEFAULT.clone()
30893    }
30894}
30895impl MessageData for UAVIONIX_ADSB_OUT_CFG_DATA {
30896    type Message = MavMessage;
30897    const ID: u32 = 10001u32;
30898    const NAME: &'static str = "UAVIONIX_ADSB_OUT_CFG";
30899    const EXTRA_CRC: u8 = 209u8;
30900    const ENCODED_LEN: usize = 20usize;
30901    fn deser(
30902        _version: MavlinkVersion,
30903        __input: &[u8],
30904    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30905        let avail_len = __input.len();
30906        let mut payload_buf = [0; Self::ENCODED_LEN];
30907        let mut buf = if avail_len < Self::ENCODED_LEN {
30908            payload_buf[0..avail_len].copy_from_slice(__input);
30909            Bytes::new(&payload_buf)
30910        } else {
30911            Bytes::new(__input)
30912        };
30913        let mut __struct = Self::default();
30914        __struct.ICAO = buf.get_u32_le();
30915        __struct.stallSpeed = buf.get_u16_le();
30916        let mut tmp = [0_u8; 9usize];
30917        for v in &mut tmp {
30918            *v = buf.get_u8();
30919        }
30920        __struct.callsign = CharArray::new(tmp);
30921        let tmp = buf.get_u8();
30922        __struct.emitterType =
30923            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30924                enum_type: "AdsbEmitterType",
30925                value: tmp as u64,
30926            })?;
30927        let tmp = buf.get_u8();
30928        __struct.aircraftSize =
30929            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30930                enum_type: "UavionixAdsbOutCfgAircraftSize",
30931                value: tmp as u64,
30932            })?;
30933        let tmp = buf.get_u8();
30934        __struct.gpsOffsetLat =
30935            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30936                enum_type: "UavionixAdsbOutCfgGpsOffsetLat",
30937                value: tmp as u64,
30938            })?;
30939        let tmp = buf.get_u8();
30940        __struct.gpsOffsetLon =
30941            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30942                enum_type: "UavionixAdsbOutCfgGpsOffsetLon",
30943                value: tmp as u64,
30944            })?;
30945        let tmp = buf.get_u8();
30946        __struct.rfSelect =
30947            UavionixAdsbOutRfSelect::from_bits(tmp as <UavionixAdsbOutRfSelect as Flags>::Bits)
30948                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30949                    flag_type: "UavionixAdsbOutRfSelect",
30950                    value: tmp as u64,
30951                })?;
30952        Ok(__struct)
30953    }
30954    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30955        let mut __tmp = BytesMut::new(bytes);
30956        #[allow(clippy::absurd_extreme_comparisons)]
30957        #[allow(unused_comparisons)]
30958        if __tmp.remaining() < Self::ENCODED_LEN {
30959            panic!(
30960                "buffer is too small (need {} bytes, but got {})",
30961                Self::ENCODED_LEN,
30962                __tmp.remaining(),
30963            )
30964        }
30965        __tmp.put_u32_le(self.ICAO);
30966        __tmp.put_u16_le(self.stallSpeed);
30967        for val in &self.callsign {
30968            __tmp.put_u8(*val);
30969        }
30970        __tmp.put_u8(self.emitterType as u8);
30971        __tmp.put_u8(self.aircraftSize as u8);
30972        __tmp.put_u8(self.gpsOffsetLat as u8);
30973        __tmp.put_u8(self.gpsOffsetLon as u8);
30974        __tmp.put_u8(self.rfSelect.bits() as u8);
30975        if matches!(version, MavlinkVersion::V2) {
30976            let len = __tmp.len();
30977            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30978        } else {
30979            __tmp.len()
30980        }
30981    }
30982}
30983#[doc = "Flight Identification for ADSB-Out vehicles."]
30984#[doc = ""]
30985#[doc = "ID: 10005"]
30986#[derive(Debug, Clone, PartialEq)]
30987#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30988#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30989#[cfg_attr(feature = "ts", derive(TS))]
30990#[cfg_attr(feature = "ts", ts(export))]
30991pub struct UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
30992    #[doc = "Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable. Reflects Control message setting. This is null-terminated."]
30993    #[cfg_attr(feature = "ts", ts(type = "string"))]
30994    pub flight_id: CharArray<9>,
30995}
30996impl UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
30997    pub const ENCODED_LEN: usize = 9usize;
30998    pub const DEFAULT: Self = Self {
30999        flight_id: CharArray::new([0_u8; 9usize]),
31000    };
31001    #[cfg(feature = "arbitrary")]
31002    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31003        use arbitrary::{Arbitrary, Unstructured};
31004        let mut buf = [0u8; 1024];
31005        rng.fill_bytes(&mut buf);
31006        let mut unstructured = Unstructured::new(&buf);
31007        Self::arbitrary(&mut unstructured).unwrap_or_default()
31008    }
31009}
31010impl Default for UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
31011    fn default() -> Self {
31012        Self::DEFAULT.clone()
31013    }
31014}
31015impl MessageData for UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA {
31016    type Message = MavMessage;
31017    const ID: u32 = 10005u32;
31018    const NAME: &'static str = "UAVIONIX_ADSB_OUT_CFG_FLIGHTID";
31019    const EXTRA_CRC: u8 = 103u8;
31020    const ENCODED_LEN: usize = 9usize;
31021    fn deser(
31022        _version: MavlinkVersion,
31023        __input: &[u8],
31024    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31025        let avail_len = __input.len();
31026        let mut payload_buf = [0; Self::ENCODED_LEN];
31027        let mut buf = if avail_len < Self::ENCODED_LEN {
31028            payload_buf[0..avail_len].copy_from_slice(__input);
31029            Bytes::new(&payload_buf)
31030        } else {
31031            Bytes::new(__input)
31032        };
31033        let mut __struct = Self::default();
31034        let mut tmp = [0_u8; 9usize];
31035        for v in &mut tmp {
31036            *v = buf.get_u8();
31037        }
31038        __struct.flight_id = CharArray::new(tmp);
31039        Ok(__struct)
31040    }
31041    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31042        let mut __tmp = BytesMut::new(bytes);
31043        #[allow(clippy::absurd_extreme_comparisons)]
31044        #[allow(unused_comparisons)]
31045        if __tmp.remaining() < Self::ENCODED_LEN {
31046            panic!(
31047                "buffer is too small (need {} bytes, but got {})",
31048                Self::ENCODED_LEN,
31049                __tmp.remaining(),
31050            )
31051        }
31052        for val in &self.flight_id {
31053            __tmp.put_u8(*val);
31054        }
31055        if matches!(version, MavlinkVersion::V2) {
31056            let len = __tmp.len();
31057            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31058        } else {
31059            __tmp.len()
31060        }
31061    }
31062}
31063#[doc = "Aircraft Registration."]
31064#[doc = ""]
31065#[doc = "ID: 10004"]
31066#[derive(Debug, Clone, PartialEq)]
31067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31068#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31069#[cfg_attr(feature = "ts", derive(TS))]
31070#[cfg_attr(feature = "ts", ts(export))]
31071pub struct UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
31072    #[doc = "Aircraft Registration (ASCII string A-Z, 0-9 only), e.g. \"N8644B \". Trailing spaces (0x20) only. This is null-terminated."]
31073    #[cfg_attr(feature = "ts", ts(type = "string"))]
31074    pub registration: CharArray<9>,
31075}
31076impl UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
31077    pub const ENCODED_LEN: usize = 9usize;
31078    pub const DEFAULT: Self = Self {
31079        registration: CharArray::new([0_u8; 9usize]),
31080    };
31081    #[cfg(feature = "arbitrary")]
31082    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31083        use arbitrary::{Arbitrary, Unstructured};
31084        let mut buf = [0u8; 1024];
31085        rng.fill_bytes(&mut buf);
31086        let mut unstructured = Unstructured::new(&buf);
31087        Self::arbitrary(&mut unstructured).unwrap_or_default()
31088    }
31089}
31090impl Default for UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
31091    fn default() -> Self {
31092        Self::DEFAULT.clone()
31093    }
31094}
31095impl MessageData for UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA {
31096    type Message = MavMessage;
31097    const ID: u32 = 10004u32;
31098    const NAME: &'static str = "UAVIONIX_ADSB_OUT_CFG_REGISTRATION";
31099    const EXTRA_CRC: u8 = 133u8;
31100    const ENCODED_LEN: usize = 9usize;
31101    fn deser(
31102        _version: MavlinkVersion,
31103        __input: &[u8],
31104    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31105        let avail_len = __input.len();
31106        let mut payload_buf = [0; Self::ENCODED_LEN];
31107        let mut buf = if avail_len < Self::ENCODED_LEN {
31108            payload_buf[0..avail_len].copy_from_slice(__input);
31109            Bytes::new(&payload_buf)
31110        } else {
31111            Bytes::new(__input)
31112        };
31113        let mut __struct = Self::default();
31114        let mut tmp = [0_u8; 9usize];
31115        for v in &mut tmp {
31116            *v = buf.get_u8();
31117        }
31118        __struct.registration = CharArray::new(tmp);
31119        Ok(__struct)
31120    }
31121    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31122        let mut __tmp = BytesMut::new(bytes);
31123        #[allow(clippy::absurd_extreme_comparisons)]
31124        #[allow(unused_comparisons)]
31125        if __tmp.remaining() < Self::ENCODED_LEN {
31126            panic!(
31127                "buffer is too small (need {} bytes, but got {})",
31128                Self::ENCODED_LEN,
31129                __tmp.remaining(),
31130            )
31131        }
31132        for val in &self.registration {
31133            __tmp.put_u8(*val);
31134        }
31135        if matches!(version, MavlinkVersion::V2) {
31136            let len = __tmp.len();
31137            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31138        } else {
31139            __tmp.len()
31140        }
31141    }
31142}
31143#[doc = "Control message with all data sent in UCP control message."]
31144#[doc = ""]
31145#[doc = "ID: 10007"]
31146#[derive(Debug, Clone, PartialEq)]
31147#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31148#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31149#[cfg_attr(feature = "ts", derive(TS))]
31150#[cfg_attr(feature = "ts", ts(export))]
31151pub struct UAVIONIX_ADSB_OUT_CONTROL_DATA {
31152    #[doc = "Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX"]
31153    pub baroAltMSL: i32,
31154    #[doc = "Mode A code (typically 1200 [0x04B0] for VFR)"]
31155    pub squawk: u16,
31156    #[doc = "ADS-B transponder control state flags"]
31157    pub state: UavionixAdsbOutControlState,
31158    #[doc = "Emergency status"]
31159    pub emergencyStatus: UavionixAdsbEmergencyStatus,
31160    #[doc = "Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable."]
31161    #[cfg_attr(feature = "ts", ts(type = "string"))]
31162    pub flight_id: CharArray<8>,
31163    #[doc = "X-Bit enable (military transponders only)"]
31164    pub x_bit: UavionixAdsbXbit,
31165}
31166impl UAVIONIX_ADSB_OUT_CONTROL_DATA {
31167    pub const ENCODED_LEN: usize = 17usize;
31168    pub const DEFAULT: Self = Self {
31169        baroAltMSL: 0_i32,
31170        squawk: 0_u16,
31171        state: UavionixAdsbOutControlState::DEFAULT,
31172        emergencyStatus: UavionixAdsbEmergencyStatus::DEFAULT,
31173        flight_id: CharArray::new([0_u8; 8usize]),
31174        x_bit: UavionixAdsbXbit::DEFAULT,
31175    };
31176    #[cfg(feature = "arbitrary")]
31177    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31178        use arbitrary::{Arbitrary, Unstructured};
31179        let mut buf = [0u8; 1024];
31180        rng.fill_bytes(&mut buf);
31181        let mut unstructured = Unstructured::new(&buf);
31182        Self::arbitrary(&mut unstructured).unwrap_or_default()
31183    }
31184}
31185impl Default for UAVIONIX_ADSB_OUT_CONTROL_DATA {
31186    fn default() -> Self {
31187        Self::DEFAULT.clone()
31188    }
31189}
31190impl MessageData for UAVIONIX_ADSB_OUT_CONTROL_DATA {
31191    type Message = MavMessage;
31192    const ID: u32 = 10007u32;
31193    const NAME: &'static str = "UAVIONIX_ADSB_OUT_CONTROL";
31194    const EXTRA_CRC: u8 = 71u8;
31195    const ENCODED_LEN: usize = 17usize;
31196    fn deser(
31197        _version: MavlinkVersion,
31198        __input: &[u8],
31199    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31200        let avail_len = __input.len();
31201        let mut payload_buf = [0; Self::ENCODED_LEN];
31202        let mut buf = if avail_len < Self::ENCODED_LEN {
31203            payload_buf[0..avail_len].copy_from_slice(__input);
31204            Bytes::new(&payload_buf)
31205        } else {
31206            Bytes::new(__input)
31207        };
31208        let mut __struct = Self::default();
31209        __struct.baroAltMSL = buf.get_i32_le();
31210        __struct.squawk = buf.get_u16_le();
31211        let tmp = buf.get_u8();
31212        __struct.state = UavionixAdsbOutControlState::from_bits(
31213            tmp as <UavionixAdsbOutControlState as Flags>::Bits,
31214        )
31215        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31216            flag_type: "UavionixAdsbOutControlState",
31217            value: tmp as u64,
31218        })?;
31219        let tmp = buf.get_u8();
31220        __struct.emergencyStatus =
31221            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31222                enum_type: "UavionixAdsbEmergencyStatus",
31223                value: tmp as u64,
31224            })?;
31225        let mut tmp = [0_u8; 8usize];
31226        for v in &mut tmp {
31227            *v = buf.get_u8();
31228        }
31229        __struct.flight_id = CharArray::new(tmp);
31230        let tmp = buf.get_u8();
31231        __struct.x_bit = UavionixAdsbXbit::from_bits(tmp as <UavionixAdsbXbit as Flags>::Bits)
31232            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31233                flag_type: "UavionixAdsbXbit",
31234                value: tmp as u64,
31235            })?;
31236        Ok(__struct)
31237    }
31238    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31239        let mut __tmp = BytesMut::new(bytes);
31240        #[allow(clippy::absurd_extreme_comparisons)]
31241        #[allow(unused_comparisons)]
31242        if __tmp.remaining() < Self::ENCODED_LEN {
31243            panic!(
31244                "buffer is too small (need {} bytes, but got {})",
31245                Self::ENCODED_LEN,
31246                __tmp.remaining(),
31247            )
31248        }
31249        __tmp.put_i32_le(self.baroAltMSL);
31250        __tmp.put_u16_le(self.squawk);
31251        __tmp.put_u8(self.state.bits() as u8);
31252        __tmp.put_u8(self.emergencyStatus as u8);
31253        for val in &self.flight_id {
31254            __tmp.put_u8(*val);
31255        }
31256        __tmp.put_u8(self.x_bit.bits() as u8);
31257        if matches!(version, MavlinkVersion::V2) {
31258            let len = __tmp.len();
31259            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31260        } else {
31261            __tmp.len()
31262        }
31263    }
31264}
31265#[doc = "Dynamic data used to generate ADS-B out transponder data (send at 5Hz)."]
31266#[doc = ""]
31267#[doc = "ID: 10002"]
31268#[derive(Debug, Clone, PartialEq)]
31269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31271#[cfg_attr(feature = "ts", derive(TS))]
31272#[cfg_attr(feature = "ts", ts(export))]
31273pub struct UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
31274    #[doc = "UTC time in seconds since GPS epoch (Jan 6, 1980). If unknown set to UINT32_MAX"]
31275    pub utcTime: u32,
31276    #[doc = "Latitude WGS84 (deg * 1E7). If unknown set to INT32_MAX"]
31277    pub gpsLat: i32,
31278    #[doc = "Longitude WGS84 (deg * 1E7). If unknown set to INT32_MAX"]
31279    pub gpsLon: i32,
31280    #[doc = "Altitude (WGS84). UP +ve. If unknown set to INT32_MAX"]
31281    pub gpsAlt: i32,
31282    #[doc = "Barometric pressure altitude (MSL) relative to a standard atmosphere of 1013.2 mBar and NOT bar corrected altitude (m * 1E-3). (up +ve). If unknown set to INT32_MAX"]
31283    pub baroAltMSL: i32,
31284    #[doc = "Horizontal accuracy in mm (m * 1E-3). If unknown set to UINT32_MAX"]
31285    pub accuracyHor: u32,
31286    #[doc = "Vertical accuracy in cm. If unknown set to UINT16_MAX"]
31287    pub accuracyVert: u16,
31288    #[doc = "Velocity accuracy in mm/s (m * 1E-3). If unknown set to UINT16_MAX"]
31289    pub accuracyVel: u16,
31290    #[doc = "GPS vertical speed in cm/s. If unknown set to INT16_MAX"]
31291    pub velVert: i16,
31292    #[doc = "North-South velocity over ground in cm/s North +ve. If unknown set to INT16_MAX"]
31293    pub velNS: i16,
31294    #[doc = "East-West velocity over ground in cm/s East +ve. If unknown set to INT16_MAX"]
31295    pub VelEW: i16,
31296    #[doc = "ADS-B transponder dynamic input state flags"]
31297    pub state: UavionixAdsbOutDynamicState,
31298    #[doc = "Mode A code (typically 1200 [0x04B0] for VFR)"]
31299    pub squawk: u16,
31300    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK"]
31301    pub gpsFix: UavionixAdsbOutDynamicGpsFix,
31302    #[doc = "Number of satellites visible. If unknown set to UINT8_MAX"]
31303    pub numSats: u8,
31304    #[doc = "Emergency status"]
31305    pub emergencyStatus: UavionixAdsbEmergencyStatus,
31306}
31307impl UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
31308    pub const ENCODED_LEN: usize = 41usize;
31309    pub const DEFAULT: Self = Self {
31310        utcTime: 0_u32,
31311        gpsLat: 0_i32,
31312        gpsLon: 0_i32,
31313        gpsAlt: 0_i32,
31314        baroAltMSL: 0_i32,
31315        accuracyHor: 0_u32,
31316        accuracyVert: 0_u16,
31317        accuracyVel: 0_u16,
31318        velVert: 0_i16,
31319        velNS: 0_i16,
31320        VelEW: 0_i16,
31321        state: UavionixAdsbOutDynamicState::DEFAULT,
31322        squawk: 0_u16,
31323        gpsFix: UavionixAdsbOutDynamicGpsFix::DEFAULT,
31324        numSats: 0_u8,
31325        emergencyStatus: UavionixAdsbEmergencyStatus::DEFAULT,
31326    };
31327    #[cfg(feature = "arbitrary")]
31328    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31329        use arbitrary::{Arbitrary, Unstructured};
31330        let mut buf = [0u8; 1024];
31331        rng.fill_bytes(&mut buf);
31332        let mut unstructured = Unstructured::new(&buf);
31333        Self::arbitrary(&mut unstructured).unwrap_or_default()
31334    }
31335}
31336impl Default for UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
31337    fn default() -> Self {
31338        Self::DEFAULT.clone()
31339    }
31340}
31341impl MessageData for UAVIONIX_ADSB_OUT_DYNAMIC_DATA {
31342    type Message = MavMessage;
31343    const ID: u32 = 10002u32;
31344    const NAME: &'static str = "UAVIONIX_ADSB_OUT_DYNAMIC";
31345    const EXTRA_CRC: u8 = 186u8;
31346    const ENCODED_LEN: usize = 41usize;
31347    fn deser(
31348        _version: MavlinkVersion,
31349        __input: &[u8],
31350    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31351        let avail_len = __input.len();
31352        let mut payload_buf = [0; Self::ENCODED_LEN];
31353        let mut buf = if avail_len < Self::ENCODED_LEN {
31354            payload_buf[0..avail_len].copy_from_slice(__input);
31355            Bytes::new(&payload_buf)
31356        } else {
31357            Bytes::new(__input)
31358        };
31359        let mut __struct = Self::default();
31360        __struct.utcTime = buf.get_u32_le();
31361        __struct.gpsLat = buf.get_i32_le();
31362        __struct.gpsLon = buf.get_i32_le();
31363        __struct.gpsAlt = buf.get_i32_le();
31364        __struct.baroAltMSL = buf.get_i32_le();
31365        __struct.accuracyHor = buf.get_u32_le();
31366        __struct.accuracyVert = buf.get_u16_le();
31367        __struct.accuracyVel = buf.get_u16_le();
31368        __struct.velVert = buf.get_i16_le();
31369        __struct.velNS = buf.get_i16_le();
31370        __struct.VelEW = buf.get_i16_le();
31371        let tmp = buf.get_u16_le();
31372        __struct.state = UavionixAdsbOutDynamicState::from_bits(
31373            tmp as <UavionixAdsbOutDynamicState as Flags>::Bits,
31374        )
31375        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31376            flag_type: "UavionixAdsbOutDynamicState",
31377            value: tmp as u64,
31378        })?;
31379        __struct.squawk = buf.get_u16_le();
31380        let tmp = buf.get_u8();
31381        __struct.gpsFix =
31382            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31383                enum_type: "UavionixAdsbOutDynamicGpsFix",
31384                value: tmp as u64,
31385            })?;
31386        __struct.numSats = buf.get_u8();
31387        let tmp = buf.get_u8();
31388        __struct.emergencyStatus =
31389            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31390                enum_type: "UavionixAdsbEmergencyStatus",
31391                value: tmp as u64,
31392            })?;
31393        Ok(__struct)
31394    }
31395    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31396        let mut __tmp = BytesMut::new(bytes);
31397        #[allow(clippy::absurd_extreme_comparisons)]
31398        #[allow(unused_comparisons)]
31399        if __tmp.remaining() < Self::ENCODED_LEN {
31400            panic!(
31401                "buffer is too small (need {} bytes, but got {})",
31402                Self::ENCODED_LEN,
31403                __tmp.remaining(),
31404            )
31405        }
31406        __tmp.put_u32_le(self.utcTime);
31407        __tmp.put_i32_le(self.gpsLat);
31408        __tmp.put_i32_le(self.gpsLon);
31409        __tmp.put_i32_le(self.gpsAlt);
31410        __tmp.put_i32_le(self.baroAltMSL);
31411        __tmp.put_u32_le(self.accuracyHor);
31412        __tmp.put_u16_le(self.accuracyVert);
31413        __tmp.put_u16_le(self.accuracyVel);
31414        __tmp.put_i16_le(self.velVert);
31415        __tmp.put_i16_le(self.velNS);
31416        __tmp.put_i16_le(self.VelEW);
31417        __tmp.put_u16_le(self.state.bits() as u16);
31418        __tmp.put_u16_le(self.squawk);
31419        __tmp.put_u8(self.gpsFix as u8);
31420        __tmp.put_u8(self.numSats);
31421        __tmp.put_u8(self.emergencyStatus as u8);
31422        if matches!(version, MavlinkVersion::V2) {
31423            let len = __tmp.len();
31424            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31425        } else {
31426            __tmp.len()
31427        }
31428    }
31429}
31430#[doc = "Status message with information from UCP Heartbeat and Status messages."]
31431#[doc = ""]
31432#[doc = "ID: 10008"]
31433#[derive(Debug, Clone, PartialEq)]
31434#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31436#[cfg_attr(feature = "ts", derive(TS))]
31437#[cfg_attr(feature = "ts", ts(export))]
31438pub struct UAVIONIX_ADSB_OUT_STATUS_DATA {
31439    #[doc = "Mode A code (typically 1200 [0x04B0] for VFR)"]
31440    pub squawk: u16,
31441    #[doc = "ADS-B transponder status state flags"]
31442    pub state: UavionixAdsbOutStatusState,
31443    #[doc = "Integrity and Accuracy of traffic reported as a 4-bit value for each field (NACp 7:4, NIC 3:0) and encoded by Containment Radius (HPL) and Estimated Position Uncertainty (HFOM), respectively"]
31444    pub NIC_NACp: UavionixAdsbOutStatusNicNacp,
31445    #[doc = "Board temperature in C"]
31446    pub boardTemp: u8,
31447    #[doc = "ADS-B transponder fault flags"]
31448    pub fault: UavionixAdsbOutStatusFault,
31449    #[doc = "Flight Identification: 8 ASCII characters, '0' through '9', 'A' through 'Z' or space. Spaces (0x20) used as a trailing pad character, or when call sign is unavailable."]
31450    #[cfg_attr(feature = "ts", ts(type = "string"))]
31451    pub flight_id: CharArray<8>,
31452}
31453impl UAVIONIX_ADSB_OUT_STATUS_DATA {
31454    pub const ENCODED_LEN: usize = 14usize;
31455    pub const DEFAULT: Self = Self {
31456        squawk: 0_u16,
31457        state: UavionixAdsbOutStatusState::DEFAULT,
31458        NIC_NACp: UavionixAdsbOutStatusNicNacp::DEFAULT,
31459        boardTemp: 0_u8,
31460        fault: UavionixAdsbOutStatusFault::DEFAULT,
31461        flight_id: CharArray::new([0_u8; 8usize]),
31462    };
31463    #[cfg(feature = "arbitrary")]
31464    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31465        use arbitrary::{Arbitrary, Unstructured};
31466        let mut buf = [0u8; 1024];
31467        rng.fill_bytes(&mut buf);
31468        let mut unstructured = Unstructured::new(&buf);
31469        Self::arbitrary(&mut unstructured).unwrap_or_default()
31470    }
31471}
31472impl Default for UAVIONIX_ADSB_OUT_STATUS_DATA {
31473    fn default() -> Self {
31474        Self::DEFAULT.clone()
31475    }
31476}
31477impl MessageData for UAVIONIX_ADSB_OUT_STATUS_DATA {
31478    type Message = MavMessage;
31479    const ID: u32 = 10008u32;
31480    const NAME: &'static str = "UAVIONIX_ADSB_OUT_STATUS";
31481    const EXTRA_CRC: u8 = 240u8;
31482    const ENCODED_LEN: usize = 14usize;
31483    fn deser(
31484        _version: MavlinkVersion,
31485        __input: &[u8],
31486    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31487        let avail_len = __input.len();
31488        let mut payload_buf = [0; Self::ENCODED_LEN];
31489        let mut buf = if avail_len < Self::ENCODED_LEN {
31490            payload_buf[0..avail_len].copy_from_slice(__input);
31491            Bytes::new(&payload_buf)
31492        } else {
31493            Bytes::new(__input)
31494        };
31495        let mut __struct = Self::default();
31496        __struct.squawk = buf.get_u16_le();
31497        let tmp = buf.get_u8();
31498        __struct.state = UavionixAdsbOutStatusState::from_bits(
31499            tmp as <UavionixAdsbOutStatusState as Flags>::Bits,
31500        )
31501        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31502            flag_type: "UavionixAdsbOutStatusState",
31503            value: tmp as u64,
31504        })?;
31505        let tmp = buf.get_u8();
31506        __struct.NIC_NACp =
31507            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31508                enum_type: "UavionixAdsbOutStatusNicNacp",
31509                value: tmp as u64,
31510            })?;
31511        __struct.boardTemp = buf.get_u8();
31512        let tmp = buf.get_u8();
31513        __struct.fault = UavionixAdsbOutStatusFault::from_bits(
31514            tmp as <UavionixAdsbOutStatusFault as Flags>::Bits,
31515        )
31516        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31517            flag_type: "UavionixAdsbOutStatusFault",
31518            value: tmp as u64,
31519        })?;
31520        let mut tmp = [0_u8; 8usize];
31521        for v in &mut tmp {
31522            *v = buf.get_u8();
31523        }
31524        __struct.flight_id = CharArray::new(tmp);
31525        Ok(__struct)
31526    }
31527    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31528        let mut __tmp = BytesMut::new(bytes);
31529        #[allow(clippy::absurd_extreme_comparisons)]
31530        #[allow(unused_comparisons)]
31531        if __tmp.remaining() < Self::ENCODED_LEN {
31532            panic!(
31533                "buffer is too small (need {} bytes, but got {})",
31534                Self::ENCODED_LEN,
31535                __tmp.remaining(),
31536            )
31537        }
31538        __tmp.put_u16_le(self.squawk);
31539        __tmp.put_u8(self.state.bits() as u8);
31540        __tmp.put_u8(self.NIC_NACp as u8);
31541        __tmp.put_u8(self.boardTemp);
31542        __tmp.put_u8(self.fault.bits() as u8);
31543        for val in &self.flight_id {
31544            __tmp.put_u8(*val);
31545        }
31546        if matches!(version, MavlinkVersion::V2) {
31547            let len = __tmp.len();
31548            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31549        } else {
31550            __tmp.len()
31551        }
31552    }
31553}
31554#[doc = "Transceiver heartbeat with health report (updated every 10s)."]
31555#[doc = ""]
31556#[doc = "ID: 10003"]
31557#[derive(Debug, Clone, PartialEq)]
31558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31559#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31560#[cfg_attr(feature = "ts", derive(TS))]
31561#[cfg_attr(feature = "ts", ts(export))]
31562pub struct UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
31563    #[doc = "ADS-B transponder messages"]
31564    pub rfHealth: UavionixAdsbRfHealth,
31565}
31566impl UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
31567    pub const ENCODED_LEN: usize = 1usize;
31568    pub const DEFAULT: Self = Self {
31569        rfHealth: UavionixAdsbRfHealth::DEFAULT,
31570    };
31571    #[cfg(feature = "arbitrary")]
31572    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31573        use arbitrary::{Arbitrary, Unstructured};
31574        let mut buf = [0u8; 1024];
31575        rng.fill_bytes(&mut buf);
31576        let mut unstructured = Unstructured::new(&buf);
31577        Self::arbitrary(&mut unstructured).unwrap_or_default()
31578    }
31579}
31580impl Default for UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
31581    fn default() -> Self {
31582        Self::DEFAULT.clone()
31583    }
31584}
31585impl MessageData for UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA {
31586    type Message = MavMessage;
31587    const ID: u32 = 10003u32;
31588    const NAME: &'static str = "UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT";
31589    const EXTRA_CRC: u8 = 4u8;
31590    const ENCODED_LEN: usize = 1usize;
31591    fn deser(
31592        _version: MavlinkVersion,
31593        __input: &[u8],
31594    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31595        let avail_len = __input.len();
31596        let mut payload_buf = [0; Self::ENCODED_LEN];
31597        let mut buf = if avail_len < Self::ENCODED_LEN {
31598            payload_buf[0..avail_len].copy_from_slice(__input);
31599            Bytes::new(&payload_buf)
31600        } else {
31601            Bytes::new(__input)
31602        };
31603        let mut __struct = Self::default();
31604        let tmp = buf.get_u8();
31605        __struct.rfHealth = UavionixAdsbRfHealth::from_bits(
31606            tmp as <UavionixAdsbRfHealth as Flags>::Bits,
31607        )
31608        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31609            flag_type: "UavionixAdsbRfHealth",
31610            value: tmp as u64,
31611        })?;
31612        Ok(__struct)
31613    }
31614    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31615        let mut __tmp = BytesMut::new(bytes);
31616        #[allow(clippy::absurd_extreme_comparisons)]
31617        #[allow(unused_comparisons)]
31618        if __tmp.remaining() < Self::ENCODED_LEN {
31619            panic!(
31620                "buffer is too small (need {} bytes, but got {})",
31621                Self::ENCODED_LEN,
31622                __tmp.remaining(),
31623            )
31624        }
31625        __tmp.put_u8(self.rfHealth.bits() as u8);
31626        if matches!(version, MavlinkVersion::V2) {
31627            let len = __tmp.len();
31628            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31629        } else {
31630            __tmp.len()
31631        }
31632    }
31633}
31634#[doc = "The global position resulting from GPS and sensor fusion."]
31635#[doc = ""]
31636#[doc = "ID: 340"]
31637#[derive(Debug, Clone, PartialEq)]
31638#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31639#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31640#[cfg_attr(feature = "ts", derive(TS))]
31641#[cfg_attr(feature = "ts", ts(export))]
31642pub struct UTM_GLOBAL_POSITION_DATA {
31643    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
31644    pub time: u64,
31645    #[doc = "Latitude (WGS84)"]
31646    pub lat: i32,
31647    #[doc = "Longitude (WGS84)"]
31648    pub lon: i32,
31649    #[doc = "Altitude (WGS84)"]
31650    pub alt: i32,
31651    #[doc = "Altitude above ground"]
31652    pub relative_alt: i32,
31653    #[doc = "Next waypoint, latitude (WGS84)"]
31654    pub next_lat: i32,
31655    #[doc = "Next waypoint, longitude (WGS84)"]
31656    pub next_lon: i32,
31657    #[doc = "Next waypoint, altitude (WGS84)"]
31658    pub next_alt: i32,
31659    #[doc = "Ground X speed (latitude, positive north)"]
31660    pub vx: i16,
31661    #[doc = "Ground Y speed (longitude, positive east)"]
31662    pub vy: i16,
31663    #[doc = "Ground Z speed (altitude, positive down)"]
31664    pub vz: i16,
31665    #[doc = "Horizontal position uncertainty (standard deviation)"]
31666    pub h_acc: u16,
31667    #[doc = "Altitude uncertainty (standard deviation)"]
31668    pub v_acc: u16,
31669    #[doc = "Speed uncertainty (standard deviation)"]
31670    pub vel_acc: u16,
31671    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
31672    pub update_rate: u16,
31673    #[doc = "Unique UAS ID."]
31674    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31675    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31676    pub uas_id: [u8; 18],
31677    #[doc = "Flight state"]
31678    pub flight_state: UtmFlightState,
31679    #[doc = "Bitwise OR combination of the data available flags."]
31680    pub flags: UtmDataAvailFlags,
31681}
31682impl UTM_GLOBAL_POSITION_DATA {
31683    pub const ENCODED_LEN: usize = 70usize;
31684    pub const DEFAULT: Self = Self {
31685        time: 0_u64,
31686        lat: 0_i32,
31687        lon: 0_i32,
31688        alt: 0_i32,
31689        relative_alt: 0_i32,
31690        next_lat: 0_i32,
31691        next_lon: 0_i32,
31692        next_alt: 0_i32,
31693        vx: 0_i16,
31694        vy: 0_i16,
31695        vz: 0_i16,
31696        h_acc: 0_u16,
31697        v_acc: 0_u16,
31698        vel_acc: 0_u16,
31699        update_rate: 0_u16,
31700        uas_id: [0_u8; 18usize],
31701        flight_state: UtmFlightState::DEFAULT,
31702        flags: UtmDataAvailFlags::DEFAULT,
31703    };
31704    #[cfg(feature = "arbitrary")]
31705    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31706        use arbitrary::{Arbitrary, Unstructured};
31707        let mut buf = [0u8; 1024];
31708        rng.fill_bytes(&mut buf);
31709        let mut unstructured = Unstructured::new(&buf);
31710        Self::arbitrary(&mut unstructured).unwrap_or_default()
31711    }
31712}
31713impl Default for UTM_GLOBAL_POSITION_DATA {
31714    fn default() -> Self {
31715        Self::DEFAULT.clone()
31716    }
31717}
31718impl MessageData for UTM_GLOBAL_POSITION_DATA {
31719    type Message = MavMessage;
31720    const ID: u32 = 340u32;
31721    const NAME: &'static str = "UTM_GLOBAL_POSITION";
31722    const EXTRA_CRC: u8 = 99u8;
31723    const ENCODED_LEN: usize = 70usize;
31724    fn deser(
31725        _version: MavlinkVersion,
31726        __input: &[u8],
31727    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31728        let avail_len = __input.len();
31729        let mut payload_buf = [0; Self::ENCODED_LEN];
31730        let mut buf = if avail_len < Self::ENCODED_LEN {
31731            payload_buf[0..avail_len].copy_from_slice(__input);
31732            Bytes::new(&payload_buf)
31733        } else {
31734            Bytes::new(__input)
31735        };
31736        let mut __struct = Self::default();
31737        __struct.time = buf.get_u64_le();
31738        __struct.lat = buf.get_i32_le();
31739        __struct.lon = buf.get_i32_le();
31740        __struct.alt = buf.get_i32_le();
31741        __struct.relative_alt = buf.get_i32_le();
31742        __struct.next_lat = buf.get_i32_le();
31743        __struct.next_lon = buf.get_i32_le();
31744        __struct.next_alt = buf.get_i32_le();
31745        __struct.vx = buf.get_i16_le();
31746        __struct.vy = buf.get_i16_le();
31747        __struct.vz = buf.get_i16_le();
31748        __struct.h_acc = buf.get_u16_le();
31749        __struct.v_acc = buf.get_u16_le();
31750        __struct.vel_acc = buf.get_u16_le();
31751        __struct.update_rate = buf.get_u16_le();
31752        for v in &mut __struct.uas_id {
31753            let val = buf.get_u8();
31754            *v = val;
31755        }
31756        let tmp = buf.get_u8();
31757        __struct.flight_state =
31758            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31759                enum_type: "UtmFlightState",
31760                value: tmp as u64,
31761            })?;
31762        let tmp = buf.get_u8();
31763        __struct.flags = UtmDataAvailFlags::from_bits(tmp as <UtmDataAvailFlags as Flags>::Bits)
31764            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31765                flag_type: "UtmDataAvailFlags",
31766                value: tmp as u64,
31767            })?;
31768        Ok(__struct)
31769    }
31770    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31771        let mut __tmp = BytesMut::new(bytes);
31772        #[allow(clippy::absurd_extreme_comparisons)]
31773        #[allow(unused_comparisons)]
31774        if __tmp.remaining() < Self::ENCODED_LEN {
31775            panic!(
31776                "buffer is too small (need {} bytes, but got {})",
31777                Self::ENCODED_LEN,
31778                __tmp.remaining(),
31779            )
31780        }
31781        __tmp.put_u64_le(self.time);
31782        __tmp.put_i32_le(self.lat);
31783        __tmp.put_i32_le(self.lon);
31784        __tmp.put_i32_le(self.alt);
31785        __tmp.put_i32_le(self.relative_alt);
31786        __tmp.put_i32_le(self.next_lat);
31787        __tmp.put_i32_le(self.next_lon);
31788        __tmp.put_i32_le(self.next_alt);
31789        __tmp.put_i16_le(self.vx);
31790        __tmp.put_i16_le(self.vy);
31791        __tmp.put_i16_le(self.vz);
31792        __tmp.put_u16_le(self.h_acc);
31793        __tmp.put_u16_le(self.v_acc);
31794        __tmp.put_u16_le(self.vel_acc);
31795        __tmp.put_u16_le(self.update_rate);
31796        for val in &self.uas_id {
31797            __tmp.put_u8(*val);
31798        }
31799        __tmp.put_u8(self.flight_state as u8);
31800        __tmp.put_u8(self.flags.bits() as u8);
31801        if matches!(version, MavlinkVersion::V2) {
31802            let len = __tmp.len();
31803            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31804        } else {
31805            __tmp.len()
31806        }
31807    }
31808}
31809#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31810#[doc = ""]
31811#[doc = "ID: 248"]
31812#[derive(Debug, Clone, PartialEq)]
31813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31814#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31815#[cfg_attr(feature = "ts", derive(TS))]
31816#[cfg_attr(feature = "ts", ts(export))]
31817pub struct V2_EXTENSION_DATA {
31818    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31819    pub message_type: u16,
31820    #[doc = "Network ID (0 for broadcast)"]
31821    pub target_network: u8,
31822    #[doc = "System ID (0 for broadcast)"]
31823    pub target_system: u8,
31824    #[doc = "Component ID (0 for broadcast)"]
31825    pub target_component: u8,
31826    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31827    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31828    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31829    pub payload: [u8; 249],
31830}
31831impl V2_EXTENSION_DATA {
31832    pub const ENCODED_LEN: usize = 254usize;
31833    pub const DEFAULT: Self = Self {
31834        message_type: 0_u16,
31835        target_network: 0_u8,
31836        target_system: 0_u8,
31837        target_component: 0_u8,
31838        payload: [0_u8; 249usize],
31839    };
31840    #[cfg(feature = "arbitrary")]
31841    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31842        use arbitrary::{Arbitrary, Unstructured};
31843        let mut buf = [0u8; 1024];
31844        rng.fill_bytes(&mut buf);
31845        let mut unstructured = Unstructured::new(&buf);
31846        Self::arbitrary(&mut unstructured).unwrap_or_default()
31847    }
31848}
31849impl Default for V2_EXTENSION_DATA {
31850    fn default() -> Self {
31851        Self::DEFAULT.clone()
31852    }
31853}
31854impl MessageData for V2_EXTENSION_DATA {
31855    type Message = MavMessage;
31856    const ID: u32 = 248u32;
31857    const NAME: &'static str = "V2_EXTENSION";
31858    const EXTRA_CRC: u8 = 8u8;
31859    const ENCODED_LEN: usize = 254usize;
31860    fn deser(
31861        _version: MavlinkVersion,
31862        __input: &[u8],
31863    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31864        let avail_len = __input.len();
31865        let mut payload_buf = [0; Self::ENCODED_LEN];
31866        let mut buf = if avail_len < Self::ENCODED_LEN {
31867            payload_buf[0..avail_len].copy_from_slice(__input);
31868            Bytes::new(&payload_buf)
31869        } else {
31870            Bytes::new(__input)
31871        };
31872        let mut __struct = Self::default();
31873        __struct.message_type = buf.get_u16_le();
31874        __struct.target_network = buf.get_u8();
31875        __struct.target_system = buf.get_u8();
31876        __struct.target_component = buf.get_u8();
31877        for v in &mut __struct.payload {
31878            let val = buf.get_u8();
31879            *v = val;
31880        }
31881        Ok(__struct)
31882    }
31883    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31884        let mut __tmp = BytesMut::new(bytes);
31885        #[allow(clippy::absurd_extreme_comparisons)]
31886        #[allow(unused_comparisons)]
31887        if __tmp.remaining() < Self::ENCODED_LEN {
31888            panic!(
31889                "buffer is too small (need {} bytes, but got {})",
31890                Self::ENCODED_LEN,
31891                __tmp.remaining(),
31892            )
31893        }
31894        __tmp.put_u16_le(self.message_type);
31895        __tmp.put_u8(self.target_network);
31896        __tmp.put_u8(self.target_system);
31897        __tmp.put_u8(self.target_component);
31898        for val in &self.payload {
31899            __tmp.put_u8(*val);
31900        }
31901        if matches!(version, MavlinkVersion::V2) {
31902            let len = __tmp.len();
31903            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31904        } else {
31905            __tmp.len()
31906        }
31907    }
31908}
31909#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
31910#[doc = ""]
31911#[doc = "ID: 74"]
31912#[derive(Debug, Clone, PartialEq)]
31913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31914#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31915#[cfg_attr(feature = "ts", derive(TS))]
31916#[cfg_attr(feature = "ts", ts(export))]
31917pub struct VFR_HUD_DATA {
31918    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
31919    pub airspeed: f32,
31920    #[doc = "Current ground speed."]
31921    pub groundspeed: f32,
31922    #[doc = "Current altitude (MSL)."]
31923    pub alt: f32,
31924    #[doc = "Current climb rate."]
31925    pub climb: f32,
31926    #[doc = "Current heading in compass units (0-360, 0=north)."]
31927    pub heading: i16,
31928    #[doc = "Current throttle setting (0 to 100)."]
31929    pub throttle: u16,
31930}
31931impl VFR_HUD_DATA {
31932    pub const ENCODED_LEN: usize = 20usize;
31933    pub const DEFAULT: Self = Self {
31934        airspeed: 0.0_f32,
31935        groundspeed: 0.0_f32,
31936        alt: 0.0_f32,
31937        climb: 0.0_f32,
31938        heading: 0_i16,
31939        throttle: 0_u16,
31940    };
31941    #[cfg(feature = "arbitrary")]
31942    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31943        use arbitrary::{Arbitrary, Unstructured};
31944        let mut buf = [0u8; 1024];
31945        rng.fill_bytes(&mut buf);
31946        let mut unstructured = Unstructured::new(&buf);
31947        Self::arbitrary(&mut unstructured).unwrap_or_default()
31948    }
31949}
31950impl Default for VFR_HUD_DATA {
31951    fn default() -> Self {
31952        Self::DEFAULT.clone()
31953    }
31954}
31955impl MessageData for VFR_HUD_DATA {
31956    type Message = MavMessage;
31957    const ID: u32 = 74u32;
31958    const NAME: &'static str = "VFR_HUD";
31959    const EXTRA_CRC: u8 = 20u8;
31960    const ENCODED_LEN: usize = 20usize;
31961    fn deser(
31962        _version: MavlinkVersion,
31963        __input: &[u8],
31964    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31965        let avail_len = __input.len();
31966        let mut payload_buf = [0; Self::ENCODED_LEN];
31967        let mut buf = if avail_len < Self::ENCODED_LEN {
31968            payload_buf[0..avail_len].copy_from_slice(__input);
31969            Bytes::new(&payload_buf)
31970        } else {
31971            Bytes::new(__input)
31972        };
31973        let mut __struct = Self::default();
31974        __struct.airspeed = buf.get_f32_le();
31975        __struct.groundspeed = buf.get_f32_le();
31976        __struct.alt = buf.get_f32_le();
31977        __struct.climb = buf.get_f32_le();
31978        __struct.heading = buf.get_i16_le();
31979        __struct.throttle = buf.get_u16_le();
31980        Ok(__struct)
31981    }
31982    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31983        let mut __tmp = BytesMut::new(bytes);
31984        #[allow(clippy::absurd_extreme_comparisons)]
31985        #[allow(unused_comparisons)]
31986        if __tmp.remaining() < Self::ENCODED_LEN {
31987            panic!(
31988                "buffer is too small (need {} bytes, but got {})",
31989                Self::ENCODED_LEN,
31990                __tmp.remaining(),
31991            )
31992        }
31993        __tmp.put_f32_le(self.airspeed);
31994        __tmp.put_f32_le(self.groundspeed);
31995        __tmp.put_f32_le(self.alt);
31996        __tmp.put_f32_le(self.climb);
31997        __tmp.put_i16_le(self.heading);
31998        __tmp.put_u16_le(self.throttle);
31999        if matches!(version, MavlinkVersion::V2) {
32000            let len = __tmp.len();
32001            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32002        } else {
32003            __tmp.len()
32004        }
32005    }
32006}
32007#[doc = "Vibration levels and accelerometer clipping."]
32008#[doc = ""]
32009#[doc = "ID: 241"]
32010#[derive(Debug, Clone, PartialEq)]
32011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32012#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32013#[cfg_attr(feature = "ts", derive(TS))]
32014#[cfg_attr(feature = "ts", ts(export))]
32015pub struct VIBRATION_DATA {
32016    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32017    pub time_usec: u64,
32018    #[doc = "Vibration levels on X-axis"]
32019    pub vibration_x: f32,
32020    #[doc = "Vibration levels on Y-axis"]
32021    pub vibration_y: f32,
32022    #[doc = "Vibration levels on Z-axis"]
32023    pub vibration_z: f32,
32024    #[doc = "first accelerometer clipping count"]
32025    pub clipping_0: u32,
32026    #[doc = "second accelerometer clipping count"]
32027    pub clipping_1: u32,
32028    #[doc = "third accelerometer clipping count"]
32029    pub clipping_2: u32,
32030}
32031impl VIBRATION_DATA {
32032    pub const ENCODED_LEN: usize = 32usize;
32033    pub const DEFAULT: Self = Self {
32034        time_usec: 0_u64,
32035        vibration_x: 0.0_f32,
32036        vibration_y: 0.0_f32,
32037        vibration_z: 0.0_f32,
32038        clipping_0: 0_u32,
32039        clipping_1: 0_u32,
32040        clipping_2: 0_u32,
32041    };
32042    #[cfg(feature = "arbitrary")]
32043    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32044        use arbitrary::{Arbitrary, Unstructured};
32045        let mut buf = [0u8; 1024];
32046        rng.fill_bytes(&mut buf);
32047        let mut unstructured = Unstructured::new(&buf);
32048        Self::arbitrary(&mut unstructured).unwrap_or_default()
32049    }
32050}
32051impl Default for VIBRATION_DATA {
32052    fn default() -> Self {
32053        Self::DEFAULT.clone()
32054    }
32055}
32056impl MessageData for VIBRATION_DATA {
32057    type Message = MavMessage;
32058    const ID: u32 = 241u32;
32059    const NAME: &'static str = "VIBRATION";
32060    const EXTRA_CRC: u8 = 90u8;
32061    const ENCODED_LEN: usize = 32usize;
32062    fn deser(
32063        _version: MavlinkVersion,
32064        __input: &[u8],
32065    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32066        let avail_len = __input.len();
32067        let mut payload_buf = [0; Self::ENCODED_LEN];
32068        let mut buf = if avail_len < Self::ENCODED_LEN {
32069            payload_buf[0..avail_len].copy_from_slice(__input);
32070            Bytes::new(&payload_buf)
32071        } else {
32072            Bytes::new(__input)
32073        };
32074        let mut __struct = Self::default();
32075        __struct.time_usec = buf.get_u64_le();
32076        __struct.vibration_x = buf.get_f32_le();
32077        __struct.vibration_y = buf.get_f32_le();
32078        __struct.vibration_z = buf.get_f32_le();
32079        __struct.clipping_0 = buf.get_u32_le();
32080        __struct.clipping_1 = buf.get_u32_le();
32081        __struct.clipping_2 = buf.get_u32_le();
32082        Ok(__struct)
32083    }
32084    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32085        let mut __tmp = BytesMut::new(bytes);
32086        #[allow(clippy::absurd_extreme_comparisons)]
32087        #[allow(unused_comparisons)]
32088        if __tmp.remaining() < Self::ENCODED_LEN {
32089            panic!(
32090                "buffer is too small (need {} bytes, but got {})",
32091                Self::ENCODED_LEN,
32092                __tmp.remaining(),
32093            )
32094        }
32095        __tmp.put_u64_le(self.time_usec);
32096        __tmp.put_f32_le(self.vibration_x);
32097        __tmp.put_f32_le(self.vibration_y);
32098        __tmp.put_f32_le(self.vibration_z);
32099        __tmp.put_u32_le(self.clipping_0);
32100        __tmp.put_u32_le(self.clipping_1);
32101        __tmp.put_u32_le(self.clipping_2);
32102        if matches!(version, MavlinkVersion::V2) {
32103            let len = __tmp.len();
32104            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32105        } else {
32106            __tmp.len()
32107        }
32108    }
32109}
32110#[doc = "Global position estimate from a Vicon motion system source."]
32111#[doc = ""]
32112#[doc = "ID: 104"]
32113#[derive(Debug, Clone, PartialEq)]
32114#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32115#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32116#[cfg_attr(feature = "ts", derive(TS))]
32117#[cfg_attr(feature = "ts", ts(export))]
32118pub struct VICON_POSITION_ESTIMATE_DATA {
32119    #[doc = "Timestamp (UNIX time or time since system boot)"]
32120    pub usec: u64,
32121    #[doc = "Global X position"]
32122    pub x: f32,
32123    #[doc = "Global Y position"]
32124    pub y: f32,
32125    #[doc = "Global Z position"]
32126    pub z: f32,
32127    #[doc = "Roll angle"]
32128    pub roll: f32,
32129    #[doc = "Pitch angle"]
32130    pub pitch: f32,
32131    #[doc = "Yaw angle"]
32132    pub yaw: f32,
32133    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
32134    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32135    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32136    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32137    pub covariance: [f32; 21],
32138}
32139impl VICON_POSITION_ESTIMATE_DATA {
32140    pub const ENCODED_LEN: usize = 116usize;
32141    pub const DEFAULT: Self = Self {
32142        usec: 0_u64,
32143        x: 0.0_f32,
32144        y: 0.0_f32,
32145        z: 0.0_f32,
32146        roll: 0.0_f32,
32147        pitch: 0.0_f32,
32148        yaw: 0.0_f32,
32149        covariance: [0.0_f32; 21usize],
32150    };
32151    #[cfg(feature = "arbitrary")]
32152    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32153        use arbitrary::{Arbitrary, Unstructured};
32154        let mut buf = [0u8; 1024];
32155        rng.fill_bytes(&mut buf);
32156        let mut unstructured = Unstructured::new(&buf);
32157        Self::arbitrary(&mut unstructured).unwrap_or_default()
32158    }
32159}
32160impl Default for VICON_POSITION_ESTIMATE_DATA {
32161    fn default() -> Self {
32162        Self::DEFAULT.clone()
32163    }
32164}
32165impl MessageData for VICON_POSITION_ESTIMATE_DATA {
32166    type Message = MavMessage;
32167    const ID: u32 = 104u32;
32168    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
32169    const EXTRA_CRC: u8 = 56u8;
32170    const ENCODED_LEN: usize = 116usize;
32171    fn deser(
32172        _version: MavlinkVersion,
32173        __input: &[u8],
32174    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32175        let avail_len = __input.len();
32176        let mut payload_buf = [0; Self::ENCODED_LEN];
32177        let mut buf = if avail_len < Self::ENCODED_LEN {
32178            payload_buf[0..avail_len].copy_from_slice(__input);
32179            Bytes::new(&payload_buf)
32180        } else {
32181            Bytes::new(__input)
32182        };
32183        let mut __struct = Self::default();
32184        __struct.usec = buf.get_u64_le();
32185        __struct.x = buf.get_f32_le();
32186        __struct.y = buf.get_f32_le();
32187        __struct.z = buf.get_f32_le();
32188        __struct.roll = buf.get_f32_le();
32189        __struct.pitch = buf.get_f32_le();
32190        __struct.yaw = buf.get_f32_le();
32191        for v in &mut __struct.covariance {
32192            let val = buf.get_f32_le();
32193            *v = val;
32194        }
32195        Ok(__struct)
32196    }
32197    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32198        let mut __tmp = BytesMut::new(bytes);
32199        #[allow(clippy::absurd_extreme_comparisons)]
32200        #[allow(unused_comparisons)]
32201        if __tmp.remaining() < Self::ENCODED_LEN {
32202            panic!(
32203                "buffer is too small (need {} bytes, but got {})",
32204                Self::ENCODED_LEN,
32205                __tmp.remaining(),
32206            )
32207        }
32208        __tmp.put_u64_le(self.usec);
32209        __tmp.put_f32_le(self.x);
32210        __tmp.put_f32_le(self.y);
32211        __tmp.put_f32_le(self.z);
32212        __tmp.put_f32_le(self.roll);
32213        __tmp.put_f32_le(self.pitch);
32214        __tmp.put_f32_le(self.yaw);
32215        if matches!(version, MavlinkVersion::V2) {
32216            for val in &self.covariance {
32217                __tmp.put_f32_le(*val);
32218            }
32219            let len = __tmp.len();
32220            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32221        } else {
32222            __tmp.len()
32223        }
32224    }
32225}
32226#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
32227#[doc = ""]
32228#[doc = "ID: 269"]
32229#[derive(Debug, Clone, PartialEq)]
32230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32232#[cfg_attr(feature = "ts", derive(TS))]
32233#[cfg_attr(feature = "ts", ts(export))]
32234pub struct VIDEO_STREAM_INFORMATION_DATA {
32235    #[doc = "Frame rate."]
32236    pub framerate: f32,
32237    #[doc = "Bit rate."]
32238    pub bitrate: u32,
32239    #[doc = "Bitmap of stream status flags."]
32240    pub flags: VideoStreamStatusFlags,
32241    #[doc = "Horizontal resolution."]
32242    pub resolution_h: u16,
32243    #[doc = "Vertical resolution."]
32244    pub resolution_v: u16,
32245    #[doc = "Video image rotation clockwise."]
32246    pub rotation: u16,
32247    #[doc = "Horizontal Field of view."]
32248    pub hfov: u16,
32249    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
32250    pub stream_id: u8,
32251    #[doc = "Number of streams available."]
32252    pub count: u8,
32253    #[doc = "Type of stream."]
32254    pub mavtype: VideoStreamType,
32255    #[doc = "Stream name."]
32256    #[cfg_attr(feature = "ts", ts(type = "string"))]
32257    pub name: CharArray<32>,
32258    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
32259    #[cfg_attr(feature = "ts", ts(type = "string"))]
32260    pub uri: CharArray<160>,
32261    #[doc = "Encoding of stream."]
32262    #[cfg_attr(feature = "serde", serde(default))]
32263    pub encoding: VideoStreamEncoding,
32264    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
32265    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32266    pub camera_device_id: u8,
32267}
32268impl VIDEO_STREAM_INFORMATION_DATA {
32269    pub const ENCODED_LEN: usize = 215usize;
32270    pub const DEFAULT: Self = Self {
32271        framerate: 0.0_f32,
32272        bitrate: 0_u32,
32273        flags: VideoStreamStatusFlags::DEFAULT,
32274        resolution_h: 0_u16,
32275        resolution_v: 0_u16,
32276        rotation: 0_u16,
32277        hfov: 0_u16,
32278        stream_id: 0_u8,
32279        count: 0_u8,
32280        mavtype: VideoStreamType::DEFAULT,
32281        name: CharArray::new([0_u8; 32usize]),
32282        uri: CharArray::new([0_u8; 160usize]),
32283        encoding: VideoStreamEncoding::DEFAULT,
32284        camera_device_id: 0_u8,
32285    };
32286    #[cfg(feature = "arbitrary")]
32287    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32288        use arbitrary::{Arbitrary, Unstructured};
32289        let mut buf = [0u8; 1024];
32290        rng.fill_bytes(&mut buf);
32291        let mut unstructured = Unstructured::new(&buf);
32292        Self::arbitrary(&mut unstructured).unwrap_or_default()
32293    }
32294}
32295impl Default for VIDEO_STREAM_INFORMATION_DATA {
32296    fn default() -> Self {
32297        Self::DEFAULT.clone()
32298    }
32299}
32300impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
32301    type Message = MavMessage;
32302    const ID: u32 = 269u32;
32303    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
32304    const EXTRA_CRC: u8 = 109u8;
32305    const ENCODED_LEN: usize = 215usize;
32306    fn deser(
32307        _version: MavlinkVersion,
32308        __input: &[u8],
32309    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32310        let avail_len = __input.len();
32311        let mut payload_buf = [0; Self::ENCODED_LEN];
32312        let mut buf = if avail_len < Self::ENCODED_LEN {
32313            payload_buf[0..avail_len].copy_from_slice(__input);
32314            Bytes::new(&payload_buf)
32315        } else {
32316            Bytes::new(__input)
32317        };
32318        let mut __struct = Self::default();
32319        __struct.framerate = buf.get_f32_le();
32320        __struct.bitrate = buf.get_u32_le();
32321        let tmp = buf.get_u16_le();
32322        __struct.flags =
32323            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
32324                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32325                    flag_type: "VideoStreamStatusFlags",
32326                    value: tmp as u64,
32327                })?;
32328        __struct.resolution_h = buf.get_u16_le();
32329        __struct.resolution_v = buf.get_u16_le();
32330        __struct.rotation = buf.get_u16_le();
32331        __struct.hfov = buf.get_u16_le();
32332        __struct.stream_id = buf.get_u8();
32333        __struct.count = buf.get_u8();
32334        let tmp = buf.get_u8();
32335        __struct.mavtype =
32336            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32337                enum_type: "VideoStreamType",
32338                value: tmp as u64,
32339            })?;
32340        let mut tmp = [0_u8; 32usize];
32341        for v in &mut tmp {
32342            *v = buf.get_u8();
32343        }
32344        __struct.name = CharArray::new(tmp);
32345        let mut tmp = [0_u8; 160usize];
32346        for v in &mut tmp {
32347            *v = buf.get_u8();
32348        }
32349        __struct.uri = CharArray::new(tmp);
32350        let tmp = buf.get_u8();
32351        __struct.encoding =
32352            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32353                enum_type: "VideoStreamEncoding",
32354                value: tmp as u64,
32355            })?;
32356        __struct.camera_device_id = buf.get_u8();
32357        Ok(__struct)
32358    }
32359    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32360        let mut __tmp = BytesMut::new(bytes);
32361        #[allow(clippy::absurd_extreme_comparisons)]
32362        #[allow(unused_comparisons)]
32363        if __tmp.remaining() < Self::ENCODED_LEN {
32364            panic!(
32365                "buffer is too small (need {} bytes, but got {})",
32366                Self::ENCODED_LEN,
32367                __tmp.remaining(),
32368            )
32369        }
32370        __tmp.put_f32_le(self.framerate);
32371        __tmp.put_u32_le(self.bitrate);
32372        __tmp.put_u16_le(self.flags.bits() as u16);
32373        __tmp.put_u16_le(self.resolution_h);
32374        __tmp.put_u16_le(self.resolution_v);
32375        __tmp.put_u16_le(self.rotation);
32376        __tmp.put_u16_le(self.hfov);
32377        __tmp.put_u8(self.stream_id);
32378        __tmp.put_u8(self.count);
32379        __tmp.put_u8(self.mavtype as u8);
32380        for val in &self.name {
32381            __tmp.put_u8(*val);
32382        }
32383        for val in &self.uri {
32384            __tmp.put_u8(*val);
32385        }
32386        if matches!(version, MavlinkVersion::V2) {
32387            __tmp.put_u8(self.encoding as u8);
32388            __tmp.put_u8(self.camera_device_id);
32389            let len = __tmp.len();
32390            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32391        } else {
32392            __tmp.len()
32393        }
32394    }
32395}
32396#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
32397#[doc = ""]
32398#[doc = "ID: 270"]
32399#[derive(Debug, Clone, PartialEq)]
32400#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32402#[cfg_attr(feature = "ts", derive(TS))]
32403#[cfg_attr(feature = "ts", ts(export))]
32404pub struct VIDEO_STREAM_STATUS_DATA {
32405    #[doc = "Frame rate"]
32406    pub framerate: f32,
32407    #[doc = "Bit rate"]
32408    pub bitrate: u32,
32409    #[doc = "Bitmap of stream status flags"]
32410    pub flags: VideoStreamStatusFlags,
32411    #[doc = "Horizontal resolution"]
32412    pub resolution_h: u16,
32413    #[doc = "Vertical resolution"]
32414    pub resolution_v: u16,
32415    #[doc = "Video image rotation clockwise"]
32416    pub rotation: u16,
32417    #[doc = "Horizontal Field of view"]
32418    pub hfov: u16,
32419    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
32420    pub stream_id: u8,
32421    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
32422    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32423    pub camera_device_id: u8,
32424}
32425impl VIDEO_STREAM_STATUS_DATA {
32426    pub const ENCODED_LEN: usize = 20usize;
32427    pub const DEFAULT: Self = Self {
32428        framerate: 0.0_f32,
32429        bitrate: 0_u32,
32430        flags: VideoStreamStatusFlags::DEFAULT,
32431        resolution_h: 0_u16,
32432        resolution_v: 0_u16,
32433        rotation: 0_u16,
32434        hfov: 0_u16,
32435        stream_id: 0_u8,
32436        camera_device_id: 0_u8,
32437    };
32438    #[cfg(feature = "arbitrary")]
32439    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32440        use arbitrary::{Arbitrary, Unstructured};
32441        let mut buf = [0u8; 1024];
32442        rng.fill_bytes(&mut buf);
32443        let mut unstructured = Unstructured::new(&buf);
32444        Self::arbitrary(&mut unstructured).unwrap_or_default()
32445    }
32446}
32447impl Default for VIDEO_STREAM_STATUS_DATA {
32448    fn default() -> Self {
32449        Self::DEFAULT.clone()
32450    }
32451}
32452impl MessageData for VIDEO_STREAM_STATUS_DATA {
32453    type Message = MavMessage;
32454    const ID: u32 = 270u32;
32455    const NAME: &'static str = "VIDEO_STREAM_STATUS";
32456    const EXTRA_CRC: u8 = 59u8;
32457    const ENCODED_LEN: usize = 20usize;
32458    fn deser(
32459        _version: MavlinkVersion,
32460        __input: &[u8],
32461    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32462        let avail_len = __input.len();
32463        let mut payload_buf = [0; Self::ENCODED_LEN];
32464        let mut buf = if avail_len < Self::ENCODED_LEN {
32465            payload_buf[0..avail_len].copy_from_slice(__input);
32466            Bytes::new(&payload_buf)
32467        } else {
32468            Bytes::new(__input)
32469        };
32470        let mut __struct = Self::default();
32471        __struct.framerate = buf.get_f32_le();
32472        __struct.bitrate = buf.get_u32_le();
32473        let tmp = buf.get_u16_le();
32474        __struct.flags =
32475            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
32476                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32477                    flag_type: "VideoStreamStatusFlags",
32478                    value: tmp as u64,
32479                })?;
32480        __struct.resolution_h = buf.get_u16_le();
32481        __struct.resolution_v = buf.get_u16_le();
32482        __struct.rotation = buf.get_u16_le();
32483        __struct.hfov = buf.get_u16_le();
32484        __struct.stream_id = buf.get_u8();
32485        __struct.camera_device_id = buf.get_u8();
32486        Ok(__struct)
32487    }
32488    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32489        let mut __tmp = BytesMut::new(bytes);
32490        #[allow(clippy::absurd_extreme_comparisons)]
32491        #[allow(unused_comparisons)]
32492        if __tmp.remaining() < Self::ENCODED_LEN {
32493            panic!(
32494                "buffer is too small (need {} bytes, but got {})",
32495                Self::ENCODED_LEN,
32496                __tmp.remaining(),
32497            )
32498        }
32499        __tmp.put_f32_le(self.framerate);
32500        __tmp.put_u32_le(self.bitrate);
32501        __tmp.put_u16_le(self.flags.bits() as u16);
32502        __tmp.put_u16_le(self.resolution_h);
32503        __tmp.put_u16_le(self.resolution_v);
32504        __tmp.put_u16_le(self.rotation);
32505        __tmp.put_u16_le(self.hfov);
32506        __tmp.put_u8(self.stream_id);
32507        if matches!(version, MavlinkVersion::V2) {
32508            __tmp.put_u8(self.camera_device_id);
32509            let len = __tmp.len();
32510            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32511        } else {
32512            __tmp.len()
32513        }
32514    }
32515}
32516#[doc = "Local position/attitude estimate from a vision source."]
32517#[doc = ""]
32518#[doc = "ID: 102"]
32519#[derive(Debug, Clone, PartialEq)]
32520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32522#[cfg_attr(feature = "ts", derive(TS))]
32523#[cfg_attr(feature = "ts", ts(export))]
32524pub struct VISION_POSITION_ESTIMATE_DATA {
32525    #[doc = "Timestamp (UNIX time or time since system boot)"]
32526    pub usec: u64,
32527    #[doc = "Local X position"]
32528    pub x: f32,
32529    #[doc = "Local Y position"]
32530    pub y: f32,
32531    #[doc = "Local Z position"]
32532    pub z: f32,
32533    #[doc = "Roll angle"]
32534    pub roll: f32,
32535    #[doc = "Pitch angle"]
32536    pub pitch: f32,
32537    #[doc = "Yaw angle"]
32538    pub yaw: f32,
32539    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
32540    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32541    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32542    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32543    pub covariance: [f32; 21],
32544    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
32545    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32546    pub reset_counter: u8,
32547}
32548impl VISION_POSITION_ESTIMATE_DATA {
32549    pub const ENCODED_LEN: usize = 117usize;
32550    pub const DEFAULT: Self = Self {
32551        usec: 0_u64,
32552        x: 0.0_f32,
32553        y: 0.0_f32,
32554        z: 0.0_f32,
32555        roll: 0.0_f32,
32556        pitch: 0.0_f32,
32557        yaw: 0.0_f32,
32558        covariance: [0.0_f32; 21usize],
32559        reset_counter: 0_u8,
32560    };
32561    #[cfg(feature = "arbitrary")]
32562    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32563        use arbitrary::{Arbitrary, Unstructured};
32564        let mut buf = [0u8; 1024];
32565        rng.fill_bytes(&mut buf);
32566        let mut unstructured = Unstructured::new(&buf);
32567        Self::arbitrary(&mut unstructured).unwrap_or_default()
32568    }
32569}
32570impl Default for VISION_POSITION_ESTIMATE_DATA {
32571    fn default() -> Self {
32572        Self::DEFAULT.clone()
32573    }
32574}
32575impl MessageData for VISION_POSITION_ESTIMATE_DATA {
32576    type Message = MavMessage;
32577    const ID: u32 = 102u32;
32578    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
32579    const EXTRA_CRC: u8 = 158u8;
32580    const ENCODED_LEN: usize = 117usize;
32581    fn deser(
32582        _version: MavlinkVersion,
32583        __input: &[u8],
32584    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32585        let avail_len = __input.len();
32586        let mut payload_buf = [0; Self::ENCODED_LEN];
32587        let mut buf = if avail_len < Self::ENCODED_LEN {
32588            payload_buf[0..avail_len].copy_from_slice(__input);
32589            Bytes::new(&payload_buf)
32590        } else {
32591            Bytes::new(__input)
32592        };
32593        let mut __struct = Self::default();
32594        __struct.usec = buf.get_u64_le();
32595        __struct.x = buf.get_f32_le();
32596        __struct.y = buf.get_f32_le();
32597        __struct.z = buf.get_f32_le();
32598        __struct.roll = buf.get_f32_le();
32599        __struct.pitch = buf.get_f32_le();
32600        __struct.yaw = buf.get_f32_le();
32601        for v in &mut __struct.covariance {
32602            let val = buf.get_f32_le();
32603            *v = val;
32604        }
32605        __struct.reset_counter = buf.get_u8();
32606        Ok(__struct)
32607    }
32608    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32609        let mut __tmp = BytesMut::new(bytes);
32610        #[allow(clippy::absurd_extreme_comparisons)]
32611        #[allow(unused_comparisons)]
32612        if __tmp.remaining() < Self::ENCODED_LEN {
32613            panic!(
32614                "buffer is too small (need {} bytes, but got {})",
32615                Self::ENCODED_LEN,
32616                __tmp.remaining(),
32617            )
32618        }
32619        __tmp.put_u64_le(self.usec);
32620        __tmp.put_f32_le(self.x);
32621        __tmp.put_f32_le(self.y);
32622        __tmp.put_f32_le(self.z);
32623        __tmp.put_f32_le(self.roll);
32624        __tmp.put_f32_le(self.pitch);
32625        __tmp.put_f32_le(self.yaw);
32626        if matches!(version, MavlinkVersion::V2) {
32627            for val in &self.covariance {
32628                __tmp.put_f32_le(*val);
32629            }
32630            __tmp.put_u8(self.reset_counter);
32631            let len = __tmp.len();
32632            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32633        } else {
32634            __tmp.len()
32635        }
32636    }
32637}
32638#[doc = "Speed estimate from a vision source."]
32639#[doc = ""]
32640#[doc = "ID: 103"]
32641#[derive(Debug, Clone, PartialEq)]
32642#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32643#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32644#[cfg_attr(feature = "ts", derive(TS))]
32645#[cfg_attr(feature = "ts", ts(export))]
32646pub struct VISION_SPEED_ESTIMATE_DATA {
32647    #[doc = "Timestamp (UNIX time or time since system boot)"]
32648    pub usec: u64,
32649    #[doc = "Global X speed"]
32650    pub x: f32,
32651    #[doc = "Global Y speed"]
32652    pub y: f32,
32653    #[doc = "Global Z speed"]
32654    pub z: f32,
32655    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
32656    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32657    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32658    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32659    pub covariance: [f32; 9],
32660    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
32661    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32662    pub reset_counter: u8,
32663}
32664impl VISION_SPEED_ESTIMATE_DATA {
32665    pub const ENCODED_LEN: usize = 57usize;
32666    pub const DEFAULT: Self = Self {
32667        usec: 0_u64,
32668        x: 0.0_f32,
32669        y: 0.0_f32,
32670        z: 0.0_f32,
32671        covariance: [0.0_f32; 9usize],
32672        reset_counter: 0_u8,
32673    };
32674    #[cfg(feature = "arbitrary")]
32675    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32676        use arbitrary::{Arbitrary, Unstructured};
32677        let mut buf = [0u8; 1024];
32678        rng.fill_bytes(&mut buf);
32679        let mut unstructured = Unstructured::new(&buf);
32680        Self::arbitrary(&mut unstructured).unwrap_or_default()
32681    }
32682}
32683impl Default for VISION_SPEED_ESTIMATE_DATA {
32684    fn default() -> Self {
32685        Self::DEFAULT.clone()
32686    }
32687}
32688impl MessageData for VISION_SPEED_ESTIMATE_DATA {
32689    type Message = MavMessage;
32690    const ID: u32 = 103u32;
32691    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
32692    const EXTRA_CRC: u8 = 208u8;
32693    const ENCODED_LEN: usize = 57usize;
32694    fn deser(
32695        _version: MavlinkVersion,
32696        __input: &[u8],
32697    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32698        let avail_len = __input.len();
32699        let mut payload_buf = [0; Self::ENCODED_LEN];
32700        let mut buf = if avail_len < Self::ENCODED_LEN {
32701            payload_buf[0..avail_len].copy_from_slice(__input);
32702            Bytes::new(&payload_buf)
32703        } else {
32704            Bytes::new(__input)
32705        };
32706        let mut __struct = Self::default();
32707        __struct.usec = buf.get_u64_le();
32708        __struct.x = buf.get_f32_le();
32709        __struct.y = buf.get_f32_le();
32710        __struct.z = buf.get_f32_le();
32711        for v in &mut __struct.covariance {
32712            let val = buf.get_f32_le();
32713            *v = val;
32714        }
32715        __struct.reset_counter = buf.get_u8();
32716        Ok(__struct)
32717    }
32718    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32719        let mut __tmp = BytesMut::new(bytes);
32720        #[allow(clippy::absurd_extreme_comparisons)]
32721        #[allow(unused_comparisons)]
32722        if __tmp.remaining() < Self::ENCODED_LEN {
32723            panic!(
32724                "buffer is too small (need {} bytes, but got {})",
32725                Self::ENCODED_LEN,
32726                __tmp.remaining(),
32727            )
32728        }
32729        __tmp.put_u64_le(self.usec);
32730        __tmp.put_f32_le(self.x);
32731        __tmp.put_f32_le(self.y);
32732        __tmp.put_f32_le(self.z);
32733        if matches!(version, MavlinkVersion::V2) {
32734            for val in &self.covariance {
32735                __tmp.put_f32_le(*val);
32736            }
32737            __tmp.put_u8(self.reset_counter);
32738            let len = __tmp.len();
32739            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32740        } else {
32741            __tmp.len()
32742        }
32743    }
32744}
32745#[doc = "Cumulative distance traveled for each reported wheel."]
32746#[doc = ""]
32747#[doc = "ID: 9000"]
32748#[derive(Debug, Clone, PartialEq)]
32749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32751#[cfg_attr(feature = "ts", derive(TS))]
32752#[cfg_attr(feature = "ts", ts(export))]
32753pub struct WHEEL_DISTANCE_DATA {
32754    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32755    pub time_usec: u64,
32756    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
32757    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32758    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32759    pub distance: [f64; 16],
32760    #[doc = "Number of wheels reported."]
32761    pub count: u8,
32762}
32763impl WHEEL_DISTANCE_DATA {
32764    pub const ENCODED_LEN: usize = 137usize;
32765    pub const DEFAULT: Self = Self {
32766        time_usec: 0_u64,
32767        distance: [0.0_f64; 16usize],
32768        count: 0_u8,
32769    };
32770    #[cfg(feature = "arbitrary")]
32771    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32772        use arbitrary::{Arbitrary, Unstructured};
32773        let mut buf = [0u8; 1024];
32774        rng.fill_bytes(&mut buf);
32775        let mut unstructured = Unstructured::new(&buf);
32776        Self::arbitrary(&mut unstructured).unwrap_or_default()
32777    }
32778}
32779impl Default for WHEEL_DISTANCE_DATA {
32780    fn default() -> Self {
32781        Self::DEFAULT.clone()
32782    }
32783}
32784impl MessageData for WHEEL_DISTANCE_DATA {
32785    type Message = MavMessage;
32786    const ID: u32 = 9000u32;
32787    const NAME: &'static str = "WHEEL_DISTANCE";
32788    const EXTRA_CRC: u8 = 113u8;
32789    const ENCODED_LEN: usize = 137usize;
32790    fn deser(
32791        _version: MavlinkVersion,
32792        __input: &[u8],
32793    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32794        let avail_len = __input.len();
32795        let mut payload_buf = [0; Self::ENCODED_LEN];
32796        let mut buf = if avail_len < Self::ENCODED_LEN {
32797            payload_buf[0..avail_len].copy_from_slice(__input);
32798            Bytes::new(&payload_buf)
32799        } else {
32800            Bytes::new(__input)
32801        };
32802        let mut __struct = Self::default();
32803        __struct.time_usec = buf.get_u64_le();
32804        for v in &mut __struct.distance {
32805            let val = buf.get_f64_le();
32806            *v = val;
32807        }
32808        __struct.count = buf.get_u8();
32809        Ok(__struct)
32810    }
32811    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32812        let mut __tmp = BytesMut::new(bytes);
32813        #[allow(clippy::absurd_extreme_comparisons)]
32814        #[allow(unused_comparisons)]
32815        if __tmp.remaining() < Self::ENCODED_LEN {
32816            panic!(
32817                "buffer is too small (need {} bytes, but got {})",
32818                Self::ENCODED_LEN,
32819                __tmp.remaining(),
32820            )
32821        }
32822        __tmp.put_u64_le(self.time_usec);
32823        for val in &self.distance {
32824            __tmp.put_f64_le(*val);
32825        }
32826        __tmp.put_u8(self.count);
32827        if matches!(version, MavlinkVersion::V2) {
32828            let len = __tmp.len();
32829            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32830        } else {
32831            __tmp.len()
32832        }
32833    }
32834}
32835#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32836#[doc = ""]
32837#[doc = "ID: 299"]
32838#[derive(Debug, Clone, PartialEq)]
32839#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32840#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32841#[cfg_attr(feature = "ts", derive(TS))]
32842#[cfg_attr(feature = "ts", ts(export))]
32843pub struct WIFI_CONFIG_AP_DATA {
32844    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32845    #[cfg_attr(feature = "ts", ts(type = "string"))]
32846    pub ssid: CharArray<32>,
32847    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32848    #[cfg_attr(feature = "ts", ts(type = "string"))]
32849    pub password: CharArray<64>,
32850    #[doc = "WiFi Mode."]
32851    #[cfg_attr(feature = "serde", serde(default))]
32852    pub mode: WifiConfigApMode,
32853    #[doc = "Message acceptance response (sent back to GS)."]
32854    #[cfg_attr(feature = "serde", serde(default))]
32855    pub response: WifiConfigApResponse,
32856}
32857impl WIFI_CONFIG_AP_DATA {
32858    pub const ENCODED_LEN: usize = 98usize;
32859    pub const DEFAULT: Self = Self {
32860        ssid: CharArray::new([0_u8; 32usize]),
32861        password: CharArray::new([0_u8; 64usize]),
32862        mode: WifiConfigApMode::DEFAULT,
32863        response: WifiConfigApResponse::DEFAULT,
32864    };
32865    #[cfg(feature = "arbitrary")]
32866    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32867        use arbitrary::{Arbitrary, Unstructured};
32868        let mut buf = [0u8; 1024];
32869        rng.fill_bytes(&mut buf);
32870        let mut unstructured = Unstructured::new(&buf);
32871        Self::arbitrary(&mut unstructured).unwrap_or_default()
32872    }
32873}
32874impl Default for WIFI_CONFIG_AP_DATA {
32875    fn default() -> Self {
32876        Self::DEFAULT.clone()
32877    }
32878}
32879impl MessageData for WIFI_CONFIG_AP_DATA {
32880    type Message = MavMessage;
32881    const ID: u32 = 299u32;
32882    const NAME: &'static str = "WIFI_CONFIG_AP";
32883    const EXTRA_CRC: u8 = 19u8;
32884    const ENCODED_LEN: usize = 98usize;
32885    fn deser(
32886        _version: MavlinkVersion,
32887        __input: &[u8],
32888    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32889        let avail_len = __input.len();
32890        let mut payload_buf = [0; Self::ENCODED_LEN];
32891        let mut buf = if avail_len < Self::ENCODED_LEN {
32892            payload_buf[0..avail_len].copy_from_slice(__input);
32893            Bytes::new(&payload_buf)
32894        } else {
32895            Bytes::new(__input)
32896        };
32897        let mut __struct = Self::default();
32898        let mut tmp = [0_u8; 32usize];
32899        for v in &mut tmp {
32900            *v = buf.get_u8();
32901        }
32902        __struct.ssid = CharArray::new(tmp);
32903        let mut tmp = [0_u8; 64usize];
32904        for v in &mut tmp {
32905            *v = buf.get_u8();
32906        }
32907        __struct.password = CharArray::new(tmp);
32908        let tmp = buf.get_i8();
32909        __struct.mode =
32910            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32911                enum_type: "WifiConfigApMode",
32912                value: tmp as u64,
32913            })?;
32914        let tmp = buf.get_i8();
32915        __struct.response =
32916            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32917                enum_type: "WifiConfigApResponse",
32918                value: tmp as u64,
32919            })?;
32920        Ok(__struct)
32921    }
32922    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32923        let mut __tmp = BytesMut::new(bytes);
32924        #[allow(clippy::absurd_extreme_comparisons)]
32925        #[allow(unused_comparisons)]
32926        if __tmp.remaining() < Self::ENCODED_LEN {
32927            panic!(
32928                "buffer is too small (need {} bytes, but got {})",
32929                Self::ENCODED_LEN,
32930                __tmp.remaining(),
32931            )
32932        }
32933        for val in &self.ssid {
32934            __tmp.put_u8(*val);
32935        }
32936        for val in &self.password {
32937            __tmp.put_u8(*val);
32938        }
32939        if matches!(version, MavlinkVersion::V2) {
32940            __tmp.put_i8(self.mode as i8);
32941            __tmp.put_i8(self.response as i8);
32942            let len = __tmp.len();
32943            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32944        } else {
32945            __tmp.len()
32946        }
32947    }
32948}
32949#[doc = "Winch status."]
32950#[doc = ""]
32951#[doc = "ID: 9005"]
32952#[derive(Debug, Clone, PartialEq)]
32953#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32954#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32955#[cfg_attr(feature = "ts", derive(TS))]
32956#[cfg_attr(feature = "ts", ts(export))]
32957pub struct WINCH_STATUS_DATA {
32958    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32959    pub time_usec: u64,
32960    #[doc = "Length of line released. NaN if unknown"]
32961    pub line_length: f32,
32962    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
32963    pub speed: f32,
32964    #[doc = "Tension on the line. NaN if unknown"]
32965    pub tension: f32,
32966    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
32967    pub voltage: f32,
32968    #[doc = "Current draw from the winch. NaN if unknown"]
32969    pub current: f32,
32970    #[doc = "Status flags"]
32971    pub status: MavWinchStatusFlag,
32972    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
32973    pub temperature: i16,
32974}
32975impl WINCH_STATUS_DATA {
32976    pub const ENCODED_LEN: usize = 34usize;
32977    pub const DEFAULT: Self = Self {
32978        time_usec: 0_u64,
32979        line_length: 0.0_f32,
32980        speed: 0.0_f32,
32981        tension: 0.0_f32,
32982        voltage: 0.0_f32,
32983        current: 0.0_f32,
32984        status: MavWinchStatusFlag::DEFAULT,
32985        temperature: 0_i16,
32986    };
32987    #[cfg(feature = "arbitrary")]
32988    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32989        use arbitrary::{Arbitrary, Unstructured};
32990        let mut buf = [0u8; 1024];
32991        rng.fill_bytes(&mut buf);
32992        let mut unstructured = Unstructured::new(&buf);
32993        Self::arbitrary(&mut unstructured).unwrap_or_default()
32994    }
32995}
32996impl Default for WINCH_STATUS_DATA {
32997    fn default() -> Self {
32998        Self::DEFAULT.clone()
32999    }
33000}
33001impl MessageData for WINCH_STATUS_DATA {
33002    type Message = MavMessage;
33003    const ID: u32 = 9005u32;
33004    const NAME: &'static str = "WINCH_STATUS";
33005    const EXTRA_CRC: u8 = 117u8;
33006    const ENCODED_LEN: usize = 34usize;
33007    fn deser(
33008        _version: MavlinkVersion,
33009        __input: &[u8],
33010    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33011        let avail_len = __input.len();
33012        let mut payload_buf = [0; Self::ENCODED_LEN];
33013        let mut buf = if avail_len < Self::ENCODED_LEN {
33014            payload_buf[0..avail_len].copy_from_slice(__input);
33015            Bytes::new(&payload_buf)
33016        } else {
33017            Bytes::new(__input)
33018        };
33019        let mut __struct = Self::default();
33020        __struct.time_usec = buf.get_u64_le();
33021        __struct.line_length = buf.get_f32_le();
33022        __struct.speed = buf.get_f32_le();
33023        __struct.tension = buf.get_f32_le();
33024        __struct.voltage = buf.get_f32_le();
33025        __struct.current = buf.get_f32_le();
33026        let tmp = buf.get_u32_le();
33027        __struct.status = MavWinchStatusFlag::from_bits(tmp as <MavWinchStatusFlag as Flags>::Bits)
33028            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33029                flag_type: "MavWinchStatusFlag",
33030                value: tmp as u64,
33031            })?;
33032        __struct.temperature = buf.get_i16_le();
33033        Ok(__struct)
33034    }
33035    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33036        let mut __tmp = BytesMut::new(bytes);
33037        #[allow(clippy::absurd_extreme_comparisons)]
33038        #[allow(unused_comparisons)]
33039        if __tmp.remaining() < Self::ENCODED_LEN {
33040            panic!(
33041                "buffer is too small (need {} bytes, but got {})",
33042                Self::ENCODED_LEN,
33043                __tmp.remaining(),
33044            )
33045        }
33046        __tmp.put_u64_le(self.time_usec);
33047        __tmp.put_f32_le(self.line_length);
33048        __tmp.put_f32_le(self.speed);
33049        __tmp.put_f32_le(self.tension);
33050        __tmp.put_f32_le(self.voltage);
33051        __tmp.put_f32_le(self.current);
33052        __tmp.put_u32_le(self.status.bits() as u32);
33053        __tmp.put_i16_le(self.temperature);
33054        if matches!(version, MavlinkVersion::V2) {
33055            let len = __tmp.len();
33056            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33057        } else {
33058            __tmp.len()
33059        }
33060    }
33061}
33062#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33063#[doc = ""]
33064#[doc = "ID: 231"]
33065#[derive(Debug, Clone, PartialEq)]
33066#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33067#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33068#[cfg_attr(feature = "ts", derive(TS))]
33069#[cfg_attr(feature = "ts", ts(export))]
33070pub struct WIND_COV_DATA {
33071    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33072    pub time_usec: u64,
33073    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
33074    pub wind_x: f32,
33075    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
33076    pub wind_y: f32,
33077    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
33078    pub wind_z: f32,
33079    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
33080    pub var_horiz: f32,
33081    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
33082    pub var_vert: f32,
33083    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
33084    pub wind_alt: f32,
33085    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
33086    pub horiz_accuracy: f32,
33087    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
33088    pub vert_accuracy: f32,
33089}
33090impl WIND_COV_DATA {
33091    pub const ENCODED_LEN: usize = 40usize;
33092    pub const DEFAULT: Self = Self {
33093        time_usec: 0_u64,
33094        wind_x: 0.0_f32,
33095        wind_y: 0.0_f32,
33096        wind_z: 0.0_f32,
33097        var_horiz: 0.0_f32,
33098        var_vert: 0.0_f32,
33099        wind_alt: 0.0_f32,
33100        horiz_accuracy: 0.0_f32,
33101        vert_accuracy: 0.0_f32,
33102    };
33103    #[cfg(feature = "arbitrary")]
33104    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33105        use arbitrary::{Arbitrary, Unstructured};
33106        let mut buf = [0u8; 1024];
33107        rng.fill_bytes(&mut buf);
33108        let mut unstructured = Unstructured::new(&buf);
33109        Self::arbitrary(&mut unstructured).unwrap_or_default()
33110    }
33111}
33112impl Default for WIND_COV_DATA {
33113    fn default() -> Self {
33114        Self::DEFAULT.clone()
33115    }
33116}
33117impl MessageData for WIND_COV_DATA {
33118    type Message = MavMessage;
33119    const ID: u32 = 231u32;
33120    const NAME: &'static str = "WIND_COV";
33121    const EXTRA_CRC: u8 = 105u8;
33122    const ENCODED_LEN: usize = 40usize;
33123    fn deser(
33124        _version: MavlinkVersion,
33125        __input: &[u8],
33126    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33127        let avail_len = __input.len();
33128        let mut payload_buf = [0; Self::ENCODED_LEN];
33129        let mut buf = if avail_len < Self::ENCODED_LEN {
33130            payload_buf[0..avail_len].copy_from_slice(__input);
33131            Bytes::new(&payload_buf)
33132        } else {
33133            Bytes::new(__input)
33134        };
33135        let mut __struct = Self::default();
33136        __struct.time_usec = buf.get_u64_le();
33137        __struct.wind_x = buf.get_f32_le();
33138        __struct.wind_y = buf.get_f32_le();
33139        __struct.wind_z = buf.get_f32_le();
33140        __struct.var_horiz = buf.get_f32_le();
33141        __struct.var_vert = buf.get_f32_le();
33142        __struct.wind_alt = buf.get_f32_le();
33143        __struct.horiz_accuracy = buf.get_f32_le();
33144        __struct.vert_accuracy = buf.get_f32_le();
33145        Ok(__struct)
33146    }
33147    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33148        let mut __tmp = BytesMut::new(bytes);
33149        #[allow(clippy::absurd_extreme_comparisons)]
33150        #[allow(unused_comparisons)]
33151        if __tmp.remaining() < Self::ENCODED_LEN {
33152            panic!(
33153                "buffer is too small (need {} bytes, but got {})",
33154                Self::ENCODED_LEN,
33155                __tmp.remaining(),
33156            )
33157        }
33158        __tmp.put_u64_le(self.time_usec);
33159        __tmp.put_f32_le(self.wind_x);
33160        __tmp.put_f32_le(self.wind_y);
33161        __tmp.put_f32_le(self.wind_z);
33162        __tmp.put_f32_le(self.var_horiz);
33163        __tmp.put_f32_le(self.var_vert);
33164        __tmp.put_f32_le(self.wind_alt);
33165        __tmp.put_f32_le(self.horiz_accuracy);
33166        __tmp.put_f32_le(self.vert_accuracy);
33167        if matches!(version, MavlinkVersion::V2) {
33168            let len = __tmp.len();
33169            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33170        } else {
33171            __tmp.len()
33172        }
33173    }
33174}
33175#[derive(Clone, PartialEq, Debug)]
33176#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33177#[cfg_attr(feature = "serde", serde(tag = "type"))]
33178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33179#[cfg_attr(feature = "ts", derive(TS))]
33180#[cfg_attr(feature = "ts", ts(export))]
33181#[repr(u32)]
33182pub enum MavMessage {
33183    #[doc = "Set the vehicle attitude and body angular rates."]
33184    #[doc = ""]
33185    #[doc = "ID: 140"]
33186    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
33187    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
33188    #[doc = ""]
33189    #[doc = "ID: 375"]
33190    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
33191    #[doc = "The location and information of an ADSB vehicle."]
33192    #[doc = ""]
33193    #[doc = "ID: 246"]
33194    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
33195    #[doc = "The location and information of an AIS vessel."]
33196    #[doc = ""]
33197    #[doc = "ID: 301"]
33198    AIS_VESSEL(AIS_VESSEL_DATA),
33199    #[doc = "The current system altitude."]
33200    #[doc = ""]
33201    #[doc = "ID: 141"]
33202    ALTITUDE(ALTITUDE_DATA),
33203    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
33204    #[doc = ""]
33205    #[doc = "ID: 30"]
33206    ATTITUDE(ATTITUDE_DATA),
33207    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
33208    #[doc = ""]
33209    #[doc = "ID: 31"]
33210    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
33211    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
33212    #[doc = ""]
33213    #[doc = "ID: 61"]
33214    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
33215    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
33216    #[doc = ""]
33217    #[doc = "ID: 83"]
33218    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
33219    #[doc = "Motion capture attitude and position."]
33220    #[doc = ""]
33221    #[doc = "ID: 138"]
33222    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
33223    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
33224    #[doc = ""]
33225    #[doc = "ID: 7"]
33226    AUTH_KEY(AUTH_KEY_DATA),
33227    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
33228    #[doc = ""]
33229    #[doc = "ID: 286"]
33230    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
33231    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
33232    #[doc = ""]
33233    #[doc = "ID: 148"]
33234    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
33235    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
33236    #[doc = ""]
33237    #[doc = "ID: 435"]
33238    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
33239    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
33240    #[doc = ""]
33241    #[doc = "ID: 437"]
33242    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
33243    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
33244    #[doc = ""]
33245    #[doc = "ID: 372"]
33246    BATTERY_INFO(BATTERY_INFO_DATA),
33247    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
33248    #[doc = ""]
33249    #[doc = "ID: 147"]
33250    BATTERY_STATUS(BATTERY_STATUS_DATA),
33251    #[doc = "Report button state change."]
33252    #[doc = ""]
33253    #[doc = "ID: 257"]
33254    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
33255    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33256    #[doc = ""]
33257    #[doc = "ID: 262"]
33258    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
33259    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33260    #[doc = ""]
33261    #[doc = "ID: 271"]
33262    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
33263    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
33264    #[doc = ""]
33265    #[doc = "ID: 263"]
33266    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
33267    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33268    #[doc = ""]
33269    #[doc = "ID: 259"]
33270    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
33271    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33272    #[doc = ""]
33273    #[doc = "ID: 260"]
33274    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
33275    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
33276    #[doc = ""]
33277    #[doc = "ID: 277"]
33278    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
33279    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
33280    #[doc = ""]
33281    #[doc = "ID: 276"]
33282    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
33283    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
33284    #[doc = ""]
33285    #[doc = "ID: 275"]
33286    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
33287    #[doc = "Camera-IMU triggering and synchronisation message."]
33288    #[doc = ""]
33289    #[doc = "ID: 112"]
33290    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
33291    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
33292    #[doc = ""]
33293    #[doc = "ID: 387"]
33294    CANFD_FRAME(CANFD_FRAME_DATA),
33295    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
33296    #[doc = ""]
33297    #[doc = "ID: 388"]
33298    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
33299    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
33300    #[doc = ""]
33301    #[doc = "ID: 386"]
33302    CAN_FRAME(CAN_FRAME_DATA),
33303    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33304    #[doc = ""]
33305    #[doc = "ID: 336"]
33306    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
33307    #[doc = "Report current used cellular network status."]
33308    #[doc = ""]
33309    #[doc = "ID: 334"]
33310    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
33311    #[doc = "Request to control this MAV."]
33312    #[doc = ""]
33313    #[doc = "ID: 5"]
33314    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
33315    #[doc = "Accept / deny control of this MAV."]
33316    #[doc = ""]
33317    #[doc = "ID: 6"]
33318    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
33319    #[doc = "Information about a potential collision."]
33320    #[doc = ""]
33321    #[doc = "ID: 247"]
33322    COLLISION(COLLISION_DATA),
33323    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33324    #[doc = ""]
33325    #[doc = "ID: 77"]
33326    COMMAND_ACK(COMMAND_ACK_DATA),
33327    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33328    #[doc = ""]
33329    #[doc = "ID: 80"]
33330    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
33331    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33332    #[doc = ""]
33333    #[doc = "ID: 75"]
33334    COMMAND_INT(COMMAND_INT_DATA),
33335    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33336    #[doc = ""]
33337    #[doc = "ID: 76"]
33338    COMMAND_LONG(COMMAND_LONG_DATA),
33339    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
33340    #[doc = ""]
33341    #[doc = "ID: 395"]
33342    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
33343    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
33344    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
33345    #[doc = ""]
33346    #[doc = "ID: 396"]
33347    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
33348    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
33349    #[doc = ""]
33350    #[doc = "ID: 397"]
33351    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
33352    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
33353    #[doc = ""]
33354    #[doc = "ID: 146"]
33355    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
33356    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
33357    #[doc = ""]
33358    #[doc = "ID: 411"]
33359    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
33360    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
33361    #[doc = ""]
33362    #[doc = "ID: 436"]
33363    CURRENT_MODE(CURRENT_MODE_DATA),
33364    #[doc = "Data stream status information."]
33365    #[doc = ""]
33366    #[doc = "ID: 67"]
33367    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
33368    DATA_STREAM(DATA_STREAM_DATA),
33369    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
33370    #[doc = ""]
33371    #[doc = "ID: 130"]
33372    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
33373    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
33374    #[doc = ""]
33375    #[doc = "ID: 254"]
33376    DEBUG(DEBUG_DATA),
33377    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
33378    #[doc = ""]
33379    #[doc = "ID: 350"]
33380    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
33381    #[doc = "To debug something using a named 3D vector."]
33382    #[doc = ""]
33383    #[doc = "ID: 250"]
33384    DEBUG_VECT(DEBUG_VECT_DATA),
33385    #[doc = "Distance sensor information for an onboard rangefinder."]
33386    #[doc = ""]
33387    #[doc = "ID: 132"]
33388    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
33389    #[doc = "EFI status output."]
33390    #[doc = ""]
33391    #[doc = "ID: 225"]
33392    EFI_STATUS(EFI_STATUS_DATA),
33393    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
33394    #[doc = ""]
33395    #[doc = "ID: 131"]
33396    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
33397    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
33398    #[doc = ""]
33399    #[doc = "ID: 290"]
33400    ESC_INFO(ESC_INFO_DATA),
33401    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
33402    #[doc = ""]
33403    #[doc = "ID: 291"]
33404    ESC_STATUS(ESC_STATUS_DATA),
33405    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
33406    #[doc = ""]
33407    #[doc = "ID: 230"]
33408    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
33409    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
33410    #[doc = ""]
33411    #[doc = "ID: 410"]
33412    EVENT(EVENT_DATA),
33413    #[doc = "Provides state for additional features."]
33414    #[doc = ""]
33415    #[doc = "ID: 245"]
33416    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
33417    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
33418    #[doc = ""]
33419    #[doc = "ID: 162"]
33420    FENCE_STATUS(FENCE_STATUS_DATA),
33421    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
33422    #[doc = ""]
33423    #[doc = "ID: 110"]
33424    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
33425    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
33426    #[doc = ""]
33427    #[doc = "ID: 264"]
33428    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
33429    #[doc = "Current motion information from a designated system."]
33430    #[doc = ""]
33431    #[doc = "ID: 144"]
33432    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
33433    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
33434    #[doc = ""]
33435    #[doc = "ID: 371"]
33436    FUEL_STATUS(FUEL_STATUS_DATA),
33437    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
33438    #[doc = ""]
33439    #[doc = "ID: 373"]
33440    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
33441    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
33442    #[doc = ""]
33443    #[doc = "ID: 285"]
33444    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
33445    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
33446    #[doc = ""]
33447    #[doc = "ID: 283"]
33448    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
33449    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
33450    #[doc = ""]
33451    #[doc = "ID: 284"]
33452    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
33453    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
33454    #[doc = ""]
33455    #[doc = "ID: 280"]
33456    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
33457    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
33458    #[doc = ""]
33459    #[doc = "ID: 282"]
33460    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
33461    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
33462    #[doc = ""]
33463    #[doc = "ID: 288"]
33464    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
33465    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
33466    #[doc = ""]
33467    #[doc = "ID: 287"]
33468    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
33469    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
33470    #[doc = ""]
33471    #[doc = "ID: 281"]
33472    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
33473    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
33474    #[doc = ""]
33475    #[doc = "ID: 33"]
33476    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
33477    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
33478    #[doc = ""]
33479    #[doc = "ID: 63"]
33480    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
33481    #[doc = "Global position/attitude estimate from a vision source."]
33482    #[doc = ""]
33483    #[doc = "ID: 101"]
33484    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
33485    #[doc = "Second GPS data."]
33486    #[doc = ""]
33487    #[doc = "ID: 124"]
33488    GPS2_RAW(GPS2_RAW_DATA),
33489    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
33490    #[doc = ""]
33491    #[doc = "ID: 128"]
33492    GPS2_RTK(GPS2_RTK_DATA),
33493    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
33494    #[doc = ""]
33495    #[doc = "ID: 49"]
33496    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
33497    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
33498    #[doc = ""]
33499    #[doc = "ID: 123"]
33500    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
33501    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
33502    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
33503    #[doc = ""]
33504    #[doc = "ID: 232"]
33505    GPS_INPUT(GPS_INPUT_DATA),
33506    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
33507    #[doc = ""]
33508    #[doc = "ID: 24"]
33509    GPS_RAW_INT(GPS_RAW_INT_DATA),
33510    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
33511    #[doc = ""]
33512    #[doc = "ID: 233"]
33513    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
33514    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
33515    #[doc = ""]
33516    #[doc = "ID: 127"]
33517    GPS_RTK(GPS_RTK_DATA),
33518    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
33519    #[doc = ""]
33520    #[doc = "ID: 25"]
33521    GPS_STATUS(GPS_STATUS_DATA),
33522    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
33523    #[doc = ""]
33524    #[doc = "ID: 0"]
33525    HEARTBEAT(HEARTBEAT_DATA),
33526    #[doc = "The IMU readings in SI units in NED body frame."]
33527    #[doc = ""]
33528    #[doc = "ID: 105"]
33529    HIGHRES_IMU(HIGHRES_IMU_DATA),
33530    #[doc = "Message appropriate for high latency connections like Iridium."]
33531    #[doc = ""]
33532    #[doc = "ID: 234"]
33533    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
33534    HIGH_LATENCY(HIGH_LATENCY_DATA),
33535    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
33536    #[doc = ""]
33537    #[doc = "ID: 235"]
33538    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
33539    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
33540    #[doc = ""]
33541    #[doc = "ID: 93"]
33542    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
33543    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
33544    #[doc = ""]
33545    #[doc = "ID: 91"]
33546    HIL_CONTROLS(HIL_CONTROLS_DATA),
33547    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
33548    #[doc = ""]
33549    #[doc = "ID: 113"]
33550    HIL_GPS(HIL_GPS_DATA),
33551    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
33552    #[doc = ""]
33553    #[doc = "ID: 114"]
33554    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
33555    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
33556    #[doc = ""]
33557    #[doc = "ID: 92"]
33558    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
33559    #[doc = "The IMU readings in SI units in NED body frame."]
33560    #[doc = ""]
33561    #[doc = "ID: 107"]
33562    HIL_SENSOR(HIL_SENSOR_DATA),
33563    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
33564    #[doc = ""]
33565    #[doc = "ID: 90"]
33566    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
33567    HIL_STATE(HIL_STATE_DATA),
33568    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
33569    #[doc = ""]
33570    #[doc = "ID: 115"]
33571    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
33572    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
33573    #[doc = ""]
33574    #[doc = "ID: 242"]
33575    HOME_POSITION(HOME_POSITION_DATA),
33576    #[doc = "Temperature and humidity from hygrometer."]
33577    #[doc = ""]
33578    #[doc = "ID: 12920"]
33579    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
33580    #[doc = "Illuminator status."]
33581    #[doc = ""]
33582    #[doc = "ID: 440"]
33583    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
33584    #[doc = "Status of the Iridium SBD link."]
33585    #[doc = ""]
33586    #[doc = "ID: 335"]
33587    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
33588    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
33589    #[doc = ""]
33590    #[doc = "ID: 149"]
33591    LANDING_TARGET(LANDING_TARGET_DATA),
33592    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
33593    #[doc = ""]
33594    #[doc = "ID: 8"]
33595    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
33596    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33597    #[doc = ""]
33598    #[doc = "ID: 32"]
33599    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
33600    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33601    #[doc = ""]
33602    #[doc = "ID: 64"]
33603    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
33604    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
33605    #[doc = ""]
33606    #[doc = "ID: 89"]
33607    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
33608    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
33609    #[doc = ""]
33610    #[doc = "ID: 268"]
33611    LOGGING_ACK(LOGGING_ACK_DATA),
33612    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
33613    #[doc = ""]
33614    #[doc = "ID: 266"]
33615    LOGGING_DATA(LOGGING_DATA_DATA),
33616    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
33617    #[doc = ""]
33618    #[doc = "ID: 267"]
33619    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
33620    #[doc = "Reply to LOG_REQUEST_DATA."]
33621    #[doc = ""]
33622    #[doc = "ID: 120"]
33623    LOG_DATA(LOG_DATA_DATA),
33624    #[doc = "Reply to LOG_REQUEST_LIST."]
33625    #[doc = ""]
33626    #[doc = "ID: 118"]
33627    LOG_ENTRY(LOG_ENTRY_DATA),
33628    #[doc = "Erase all logs."]
33629    #[doc = ""]
33630    #[doc = "ID: 121"]
33631    LOG_ERASE(LOG_ERASE_DATA),
33632    #[doc = "Request a chunk of a log."]
33633    #[doc = ""]
33634    #[doc = "ID: 119"]
33635    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
33636    #[doc = "Stop log transfer and resume normal logging."]
33637    #[doc = ""]
33638    #[doc = "ID: 122"]
33639    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
33640    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
33641    #[doc = ""]
33642    #[doc = "ID: 117"]
33643    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
33644    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
33645    #[doc = ""]
33646    #[doc = "ID: 192"]
33647    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
33648    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
33649    #[doc = ""]
33650    #[doc = "ID: 69"]
33651    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
33652    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
33653    #[doc = ""]
33654    #[doc = "ID: 81"]
33655    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
33656    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33657    #[doc = ""]
33658    #[doc = "ID: 249"]
33659    MEMORY_VECT(MEMORY_VECT_DATA),
33660    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
33661    #[doc = ""]
33662    #[doc = "ID: 244"]
33663    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
33664    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
33665    #[doc = ""]
33666    #[doc = "ID: 47"]
33667    MISSION_ACK(MISSION_ACK_DATA),
33668    #[doc = "Delete all mission items at once."]
33669    #[doc = ""]
33670    #[doc = "ID: 45"]
33671    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
33672    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
33673    #[doc = ""]
33674    #[doc = "ID: 44"]
33675    MISSION_COUNT(MISSION_COUNT_DATA),
33676    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
33677    #[doc = ""]
33678    #[doc = "ID: 42"]
33679    MISSION_CURRENT(MISSION_CURRENT_DATA),
33680    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33681    #[doc = ""]
33682    #[doc = "ID: 39"]
33683    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
33684    MISSION_ITEM(MISSION_ITEM_DATA),
33685    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33686    #[doc = ""]
33687    #[doc = "ID: 73"]
33688    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
33689    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
33690    #[doc = ""]
33691    #[doc = "ID: 46"]
33692    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
33693    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
33694    #[doc = ""]
33695    #[doc = "ID: 40"]
33696    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
33697    MISSION_REQUEST(MISSION_REQUEST_DATA),
33698    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
33699    #[doc = ""]
33700    #[doc = "ID: 51"]
33701    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33702    #[doc = "Request the overall list of mission items from the system/component."]
33703    #[doc = ""]
33704    #[doc = "ID: 43"]
33705    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33706    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
33707    #[doc = ""]
33708    #[doc = "ID: 37"]
33709    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33710    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
33711    #[doc = ""]
33712    #[doc = "ID: 41"]
33713    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
33714    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33715    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
33716    #[doc = ""]
33717    #[doc = "ID: 38"]
33718    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33719    #[doc = "Orientation of a mount."]
33720    #[doc = ""]
33721    #[doc = "ID: 265"]
33722    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
33723    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33724    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33725    #[doc = ""]
33726    #[doc = "ID: 251"]
33727    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33728    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33729    #[doc = ""]
33730    #[doc = "ID: 252"]
33731    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33732    #[doc = "The state of the navigation and position controller."]
33733    #[doc = ""]
33734    #[doc = "ID: 62"]
33735    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33736    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
33737    #[doc = ""]
33738    #[doc = "ID: 330"]
33739    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33740    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
33741    #[doc = ""]
33742    #[doc = "ID: 331"]
33743    ODOMETRY(ODOMETRY_DATA),
33744    #[doc = "Hardware status sent by an onboard computer."]
33745    #[doc = ""]
33746    #[doc = "ID: 390"]
33747    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33748    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
33749    #[doc = ""]
33750    #[doc = "ID: 12918"]
33751    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33752    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
33753    #[doc = ""]
33754    #[doc = "ID: 12902"]
33755    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33756    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33757    #[doc = ""]
33758    #[doc = "ID: 12900"]
33759    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33760    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33761    #[doc = ""]
33762    #[doc = "ID: 12901"]
33763    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33764    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33765    #[doc = ""]
33766    #[doc = "ID: 12915"]
33767    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33768    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33769    #[doc = ""]
33770    #[doc = "ID: 12905"]
33771    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33772    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33773    #[doc = ""]
33774    #[doc = "ID: 12903"]
33775    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33776    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33777    #[doc = ""]
33778    #[doc = "ID: 12904"]
33779    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33780    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33781    #[doc = ""]
33782    #[doc = "ID: 12919"]
33783    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33784    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33785    #[doc = ""]
33786    #[doc = "ID: 100"]
33787    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33788    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33789    #[doc = ""]
33790    #[doc = "ID: 106"]
33791    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33792    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33793    #[doc = ""]
33794    #[doc = "ID: 360"]
33795    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33796    #[doc = "Response from a PARAM_EXT_SET message."]
33797    #[doc = ""]
33798    #[doc = "ID: 324"]
33799    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33800    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33801    #[doc = ""]
33802    #[doc = "ID: 321"]
33803    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33804    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33805    #[doc = ""]
33806    #[doc = "ID: 320"]
33807    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33808    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33809    #[doc = ""]
33810    #[doc = "ID: 323"]
33811    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33812    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33813    #[doc = ""]
33814    #[doc = "ID: 322"]
33815    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33816    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33817    #[doc = ""]
33818    #[doc = "ID: 50"]
33819    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33820    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33821    #[doc = ""]
33822    #[doc = "ID: 21"]
33823    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33824    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33825    #[doc = ""]
33826    #[doc = "ID: 20"]
33827    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33828    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33829    #[doc = ""]
33830    #[doc = "ID: 23"]
33831    PARAM_SET(PARAM_SET_DATA),
33832    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33833    #[doc = ""]
33834    #[doc = "ID: 22"]
33835    PARAM_VALUE(PARAM_VALUE_DATA),
33836    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33837    #[doc = ""]
33838    #[doc = "ID: 4"]
33839    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33840    PING(PING_DATA),
33841    #[doc = "Control vehicle tone generation (buzzer)."]
33842    #[doc = ""]
33843    #[doc = "ID: 258"]
33844    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33845    PLAY_TUNE(PLAY_TUNE_DATA),
33846    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33847    #[doc = ""]
33848    #[doc = "ID: 400"]
33849    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33850    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33851    #[doc = ""]
33852    #[doc = "ID: 87"]
33853    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33854    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33855    #[doc = ""]
33856    #[doc = "ID: 85"]
33857    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33858    #[doc = "Power supply status."]
33859    #[doc = ""]
33860    #[doc = "ID: 125"]
33861    POWER_STATUS(POWER_STATUS_DATA),
33862    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33863    #[doc = ""]
33864    #[doc = "ID: 300"]
33865    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33866    #[doc = "Status generated by radio and injected into MAVLink stream."]
33867    #[doc = ""]
33868    #[doc = "ID: 109"]
33869    RADIO_STATUS(RADIO_STATUS_DATA),
33870    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
33871    #[doc = ""]
33872    #[doc = "ID: 27"]
33873    RAW_IMU(RAW_IMU_DATA),
33874    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
33875    #[doc = ""]
33876    #[doc = "ID: 28"]
33877    RAW_PRESSURE(RAW_PRESSURE_DATA),
33878    #[doc = "RPM sensor data message."]
33879    #[doc = ""]
33880    #[doc = "ID: 339"]
33881    RAW_RPM(RAW_RPM_DATA),
33882    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33883    #[doc = ""]
33884    #[doc = "ID: 65"]
33885    RC_CHANNELS(RC_CHANNELS_DATA),
33886    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
33887    #[doc = ""]
33888    #[doc = "ID: 70"]
33889    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33890    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33891    #[doc = ""]
33892    #[doc = "ID: 35"]
33893    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33894    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
33895    #[doc = ""]
33896    #[doc = "ID: 34"]
33897    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33898    #[doc = "Request a data stream."]
33899    #[doc = ""]
33900    #[doc = "ID: 66"]
33901    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
33902    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33903    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
33904    #[doc = ""]
33905    #[doc = "ID: 412"]
33906    REQUEST_EVENT(REQUEST_EVENT_DATA),
33907    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
33908    #[doc = ""]
33909    #[doc = "ID: 142"]
33910    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33911    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
33912    #[doc = ""]
33913    #[doc = "ID: 413"]
33914    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33915    #[doc = "Read out the safety zone the MAV currently assumes."]
33916    #[doc = ""]
33917    #[doc = "ID: 55"]
33918    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33919    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
33920    #[doc = ""]
33921    #[doc = "ID: 54"]
33922    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33923    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
33924    #[doc = ""]
33925    #[doc = "ID: 26"]
33926    SCALED_IMU(SCALED_IMU_DATA),
33927    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
33928    #[doc = ""]
33929    #[doc = "ID: 116"]
33930    SCALED_IMU2(SCALED_IMU2_DATA),
33931    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
33932    #[doc = ""]
33933    #[doc = "ID: 129"]
33934    SCALED_IMU3(SCALED_IMU3_DATA),
33935    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
33936    #[doc = ""]
33937    #[doc = "ID: 29"]
33938    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33939    #[doc = "Barometer readings for 2nd barometer."]
33940    #[doc = ""]
33941    #[doc = "ID: 137"]
33942    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33943    #[doc = "Barometer readings for 3rd barometer."]
33944    #[doc = ""]
33945    #[doc = "ID: 143"]
33946    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33947    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
33948    #[doc = ""]
33949    #[doc = "ID: 126"]
33950    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33951    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
33952    #[doc = ""]
33953    #[doc = "ID: 36"]
33954    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33955    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
33956    #[doc = ""]
33957    #[doc = "ID: 256"]
33958    SETUP_SIGNING(SETUP_SIGNING_DATA),
33959    #[doc = "Set the vehicle attitude and body angular rates."]
33960    #[doc = ""]
33961    #[doc = "ID: 139"]
33962    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33963    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
33964    #[doc = ""]
33965    #[doc = "ID: 82"]
33966    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33967    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
33968    #[doc = ""]
33969    #[doc = "ID: 48"]
33970    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
33971    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33972    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
33973    #[doc = ""]
33974    #[doc = "ID: 243"]
33975    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
33976    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33977    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
33978    #[doc = ""]
33979    #[doc = "ID: 11"]
33980    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
33981    SET_MODE(SET_MODE_DATA),
33982    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
33983    #[doc = ""]
33984    #[doc = "ID: 86"]
33985    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33986    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
33987    #[doc = ""]
33988    #[doc = "ID: 84"]
33989    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33990    #[doc = "Status of simulation environment, if used."]
33991    #[doc = ""]
33992    #[doc = "ID: 108"]
33993    SIM_STATE(SIM_STATE_DATA),
33994    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
33995    #[doc = ""]
33996    #[doc = "ID: 370"]
33997    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
33998    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33999    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
34000    #[doc = ""]
34001    #[doc = "ID: 253"]
34002    STATUSTEXT(STATUSTEXT_DATA),
34003    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
34004    #[doc = ""]
34005    #[doc = "ID: 261"]
34006    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
34007    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
34008    #[doc = ""]
34009    #[doc = "ID: 401"]
34010    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
34011    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
34012    #[doc = ""]
34013    #[doc = "ID: 2"]
34014    SYSTEM_TIME(SYSTEM_TIME_DATA),
34015    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
34016    #[doc = ""]
34017    #[doc = "ID: 1"]
34018    SYS_STATUS(SYS_STATUS_DATA),
34019    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
34020    #[doc = ""]
34021    #[doc = "ID: 135"]
34022    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
34023    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34024    #[doc = ""]
34025    #[doc = "ID: 134"]
34026    TERRAIN_DATA(TERRAIN_DATA_DATA),
34027    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34028    #[doc = ""]
34029    #[doc = "ID: 136"]
34030    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
34031    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34032    #[doc = ""]
34033    #[doc = "ID: 133"]
34034    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
34035    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
34036    #[doc = ""]
34037    #[doc = "ID: 111"]
34038    TIMESYNC(TIMESYNC_DATA),
34039    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
34040    #[doc = ""]
34041    #[doc = "ID: 380"]
34042    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
34043    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
34044    #[doc = ""]
34045    #[doc = "ID: 333"]
34046    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
34047    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
34048    #[doc = ""]
34049    #[doc = "ID: 332"]
34050    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
34051    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
34052    #[doc = ""]
34053    #[doc = "ID: 385"]
34054    TUNNEL(TUNNEL_DATA),
34055    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
34056    #[doc = ""]
34057    #[doc = "ID: 311"]
34058    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
34059    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
34060    #[doc = ""]
34061    #[doc = "ID: 310"]
34062    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
34063    #[doc = "Request messages."]
34064    #[doc = ""]
34065    #[doc = "ID: 10006"]
34066    UAVIONIX_ADSB_GET(UAVIONIX_ADSB_GET_DATA),
34067    #[doc = "Static data to configure the ADS-B transponder (send within 10 sec of a POR and every 10 sec thereafter)."]
34068    #[doc = ""]
34069    #[doc = "ID: 10001"]
34070    UAVIONIX_ADSB_OUT_CFG(UAVIONIX_ADSB_OUT_CFG_DATA),
34071    #[doc = "Flight Identification for ADSB-Out vehicles."]
34072    #[doc = ""]
34073    #[doc = "ID: 10005"]
34074    UAVIONIX_ADSB_OUT_CFG_FLIGHTID(UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA),
34075    #[doc = "Aircraft Registration."]
34076    #[doc = ""]
34077    #[doc = "ID: 10004"]
34078    UAVIONIX_ADSB_OUT_CFG_REGISTRATION(UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA),
34079    #[doc = "Control message with all data sent in UCP control message."]
34080    #[doc = ""]
34081    #[doc = "ID: 10007"]
34082    UAVIONIX_ADSB_OUT_CONTROL(UAVIONIX_ADSB_OUT_CONTROL_DATA),
34083    #[doc = "Dynamic data used to generate ADS-B out transponder data (send at 5Hz)."]
34084    #[doc = ""]
34085    #[doc = "ID: 10002"]
34086    UAVIONIX_ADSB_OUT_DYNAMIC(UAVIONIX_ADSB_OUT_DYNAMIC_DATA),
34087    #[doc = "Status message with information from UCP Heartbeat and Status messages."]
34088    #[doc = ""]
34089    #[doc = "ID: 10008"]
34090    UAVIONIX_ADSB_OUT_STATUS(UAVIONIX_ADSB_OUT_STATUS_DATA),
34091    #[doc = "Transceiver heartbeat with health report (updated every 10s)."]
34092    #[doc = ""]
34093    #[doc = "ID: 10003"]
34094    UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA),
34095    #[doc = "The global position resulting from GPS and sensor fusion."]
34096    #[doc = ""]
34097    #[doc = "ID: 340"]
34098    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
34099    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
34100    #[doc = ""]
34101    #[doc = "ID: 248"]
34102    V2_EXTENSION(V2_EXTENSION_DATA),
34103    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
34104    #[doc = ""]
34105    #[doc = "ID: 74"]
34106    VFR_HUD(VFR_HUD_DATA),
34107    #[doc = "Vibration levels and accelerometer clipping."]
34108    #[doc = ""]
34109    #[doc = "ID: 241"]
34110    VIBRATION(VIBRATION_DATA),
34111    #[doc = "Global position estimate from a Vicon motion system source."]
34112    #[doc = ""]
34113    #[doc = "ID: 104"]
34114    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
34115    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
34116    #[doc = ""]
34117    #[doc = "ID: 269"]
34118    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
34119    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
34120    #[doc = ""]
34121    #[doc = "ID: 270"]
34122    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
34123    #[doc = "Local position/attitude estimate from a vision source."]
34124    #[doc = ""]
34125    #[doc = "ID: 102"]
34126    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
34127    #[doc = "Speed estimate from a vision source."]
34128    #[doc = ""]
34129    #[doc = "ID: 103"]
34130    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
34131    #[doc = "Cumulative distance traveled for each reported wheel."]
34132    #[doc = ""]
34133    #[doc = "ID: 9000"]
34134    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
34135    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34136    #[doc = ""]
34137    #[doc = "ID: 299"]
34138    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
34139    #[doc = "Winch status."]
34140    #[doc = ""]
34141    #[doc = "ID: 9005"]
34142    WINCH_STATUS(WINCH_STATUS_DATA),
34143    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
34144    #[doc = ""]
34145    #[doc = "ID: 231"]
34146    WIND_COV(WIND_COV_DATA),
34147}
34148impl MavMessage {
34149    pub const fn all_ids() -> &'static [u32] {
34150        &[
34151            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
34152            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
34153            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
34154            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
34155            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
34156            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
34157            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
34158            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
34159            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
34160            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
34161            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
34162            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
34163            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
34164            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
34165            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
34166            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
34167            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
34168            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
34169            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
34170            440u32, 9000u32, 9005u32, 10001u32, 10002u32, 10003u32, 10004u32, 10005u32, 10006u32,
34171            10007u32, 10008u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
34172            12915u32, 12918u32, 12919u32, 12920u32,
34173        ]
34174    }
34175}
34176impl Message for MavMessage {
34177    fn parse(
34178        version: MavlinkVersion,
34179        id: u32,
34180        payload: &[u8],
34181    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34182        match id {
34183            ACTUATOR_CONTROL_TARGET_DATA::ID => {
34184                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34185                    .map(Self::ACTUATOR_CONTROL_TARGET)
34186            }
34187            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
34188                .map(Self::ACTUATOR_OUTPUT_STATUS),
34189            ADSB_VEHICLE_DATA::ID => {
34190                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
34191            }
34192            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
34193            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
34194            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
34195            ATTITUDE_QUATERNION_DATA::ID => {
34196                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
34197            }
34198            ATTITUDE_QUATERNION_COV_DATA::ID => {
34199                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
34200                    .map(Self::ATTITUDE_QUATERNION_COV)
34201            }
34202            ATTITUDE_TARGET_DATA::ID => {
34203                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
34204            }
34205            ATT_POS_MOCAP_DATA::ID => {
34206                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
34207            }
34208            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
34209            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34210                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
34211                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
34212            }
34213            AUTOPILOT_VERSION_DATA::ID => {
34214                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
34215            }
34216            AVAILABLE_MODES_DATA::ID => {
34217                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
34218            }
34219            AVAILABLE_MODES_MONITOR_DATA::ID => {
34220                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
34221                    .map(Self::AVAILABLE_MODES_MONITOR)
34222            }
34223            BATTERY_INFO_DATA::ID => {
34224                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
34225            }
34226            BATTERY_STATUS_DATA::ID => {
34227                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
34228            }
34229            BUTTON_CHANGE_DATA::ID => {
34230                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
34231            }
34232            CAMERA_CAPTURE_STATUS_DATA::ID => {
34233                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
34234            }
34235            CAMERA_FOV_STATUS_DATA::ID => {
34236                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
34237            }
34238            CAMERA_IMAGE_CAPTURED_DATA::ID => {
34239                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
34240            }
34241            CAMERA_INFORMATION_DATA::ID => {
34242                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
34243            }
34244            CAMERA_SETTINGS_DATA::ID => {
34245                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
34246            }
34247            CAMERA_THERMAL_RANGE_DATA::ID => {
34248                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
34249            }
34250            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
34251                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
34252                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
34253            }
34254            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
34255                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
34256                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
34257            }
34258            CAMERA_TRIGGER_DATA::ID => {
34259                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
34260            }
34261            CANFD_FRAME_DATA::ID => {
34262                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
34263            }
34264            CAN_FILTER_MODIFY_DATA::ID => {
34265                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
34266            }
34267            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
34268            CELLULAR_CONFIG_DATA::ID => {
34269                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
34270            }
34271            CELLULAR_STATUS_DATA::ID => {
34272                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
34273            }
34274            CHANGE_OPERATOR_CONTROL_DATA::ID => {
34275                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
34276                    .map(Self::CHANGE_OPERATOR_CONTROL)
34277            }
34278            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
34279                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
34280                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
34281            }
34282            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
34283            COMMAND_ACK_DATA::ID => {
34284                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
34285            }
34286            COMMAND_CANCEL_DATA::ID => {
34287                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
34288            }
34289            COMMAND_INT_DATA::ID => {
34290                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
34291            }
34292            COMMAND_LONG_DATA::ID => {
34293                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
34294            }
34295            COMPONENT_INFORMATION_DATA::ID => {
34296                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
34297            }
34298            COMPONENT_INFORMATION_BASIC_DATA::ID => {
34299                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
34300                    .map(Self::COMPONENT_INFORMATION_BASIC)
34301            }
34302            COMPONENT_METADATA_DATA::ID => {
34303                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
34304            }
34305            CONTROL_SYSTEM_STATE_DATA::ID => {
34306                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
34307            }
34308            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
34309                .map(Self::CURRENT_EVENT_SEQUENCE),
34310            CURRENT_MODE_DATA::ID => {
34311                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
34312            }
34313            DATA_STREAM_DATA::ID => {
34314                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
34315            }
34316            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
34317                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
34318                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
34319            }
34320            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
34321            DEBUG_FLOAT_ARRAY_DATA::ID => {
34322                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
34323            }
34324            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
34325            DISTANCE_SENSOR_DATA::ID => {
34326                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
34327            }
34328            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
34329            ENCAPSULATED_DATA_DATA::ID => {
34330                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
34331            }
34332            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
34333            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
34334            ESTIMATOR_STATUS_DATA::ID => {
34335                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
34336            }
34337            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
34338            EXTENDED_SYS_STATE_DATA::ID => {
34339                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
34340            }
34341            FENCE_STATUS_DATA::ID => {
34342                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
34343            }
34344            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
34345                .map(Self::FILE_TRANSFER_PROTOCOL),
34346            FLIGHT_INFORMATION_DATA::ID => {
34347                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
34348            }
34349            FOLLOW_TARGET_DATA::ID => {
34350                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
34351            }
34352            FUEL_STATUS_DATA::ID => {
34353                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
34354            }
34355            GENERATOR_STATUS_DATA::ID => {
34356                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
34357            }
34358            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
34359                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
34360                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
34361            }
34362            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
34363                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
34364                    .map(Self::GIMBAL_DEVICE_INFORMATION)
34365            }
34366            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
34367                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
34368                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
34369            }
34370            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
34371                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
34372                    .map(Self::GIMBAL_MANAGER_INFORMATION)
34373            }
34374            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
34375                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
34376                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
34377            }
34378            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34379                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
34380                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
34381            }
34382            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
34383                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
34384                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
34385            }
34386            GIMBAL_MANAGER_STATUS_DATA::ID => {
34387                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
34388            }
34389            GLOBAL_POSITION_INT_DATA::ID => {
34390                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
34391            }
34392            GLOBAL_POSITION_INT_COV_DATA::ID => {
34393                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
34394                    .map(Self::GLOBAL_POSITION_INT_COV)
34395            }
34396            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34397                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34398                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
34399            }
34400            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
34401            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
34402            GPS_GLOBAL_ORIGIN_DATA::ID => {
34403                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
34404            }
34405            GPS_INJECT_DATA_DATA::ID => {
34406                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
34407            }
34408            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
34409            GPS_RAW_INT_DATA::ID => {
34410                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
34411            }
34412            GPS_RTCM_DATA_DATA::ID => {
34413                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
34414            }
34415            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
34416            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
34417            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
34418            HIGHRES_IMU_DATA::ID => {
34419                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
34420            }
34421            HIGH_LATENCY_DATA::ID => {
34422                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
34423            }
34424            HIGH_LATENCY2_DATA::ID => {
34425                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
34426            }
34427            HIL_ACTUATOR_CONTROLS_DATA::ID => {
34428                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
34429            }
34430            HIL_CONTROLS_DATA::ID => {
34431                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
34432            }
34433            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
34434            HIL_OPTICAL_FLOW_DATA::ID => {
34435                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
34436            }
34437            HIL_RC_INPUTS_RAW_DATA::ID => {
34438                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
34439            }
34440            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
34441            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
34442            HIL_STATE_QUATERNION_DATA::ID => {
34443                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
34444            }
34445            HOME_POSITION_DATA::ID => {
34446                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
34447            }
34448            HYGROMETER_SENSOR_DATA::ID => {
34449                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
34450            }
34451            ILLUMINATOR_STATUS_DATA::ID => {
34452                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
34453            }
34454            ISBD_LINK_STATUS_DATA::ID => {
34455                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
34456            }
34457            LANDING_TARGET_DATA::ID => {
34458                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
34459            }
34460            LINK_NODE_STATUS_DATA::ID => {
34461                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
34462            }
34463            LOCAL_POSITION_NED_DATA::ID => {
34464                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
34465            }
34466            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
34467                .map(Self::LOCAL_POSITION_NED_COV),
34468            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34469                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
34470                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
34471            }
34472            LOGGING_ACK_DATA::ID => {
34473                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
34474            }
34475            LOGGING_DATA_DATA::ID => {
34476                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
34477            }
34478            LOGGING_DATA_ACKED_DATA::ID => {
34479                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
34480            }
34481            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
34482            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
34483            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
34484            LOG_REQUEST_DATA_DATA::ID => {
34485                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
34486            }
34487            LOG_REQUEST_END_DATA::ID => {
34488                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
34489            }
34490            LOG_REQUEST_LIST_DATA::ID => {
34491                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
34492            }
34493            MAG_CAL_REPORT_DATA::ID => {
34494                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
34495            }
34496            MANUAL_CONTROL_DATA::ID => {
34497                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
34498            }
34499            MANUAL_SETPOINT_DATA::ID => {
34500                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
34501            }
34502            MEMORY_VECT_DATA::ID => {
34503                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
34504            }
34505            MESSAGE_INTERVAL_DATA::ID => {
34506                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
34507            }
34508            MISSION_ACK_DATA::ID => {
34509                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
34510            }
34511            MISSION_CLEAR_ALL_DATA::ID => {
34512                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
34513            }
34514            MISSION_COUNT_DATA::ID => {
34515                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
34516            }
34517            MISSION_CURRENT_DATA::ID => {
34518                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
34519            }
34520            MISSION_ITEM_DATA::ID => {
34521                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
34522            }
34523            MISSION_ITEM_INT_DATA::ID => {
34524                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
34525            }
34526            MISSION_ITEM_REACHED_DATA::ID => {
34527                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
34528            }
34529            MISSION_REQUEST_DATA::ID => {
34530                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
34531            }
34532            MISSION_REQUEST_INT_DATA::ID => {
34533                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
34534            }
34535            MISSION_REQUEST_LIST_DATA::ID => {
34536                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
34537            }
34538            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
34539                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
34540                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
34541            }
34542            MISSION_SET_CURRENT_DATA::ID => {
34543                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
34544            }
34545            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
34546                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
34547                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
34548            }
34549            MOUNT_ORIENTATION_DATA::ID => {
34550                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
34551            }
34552            NAMED_VALUE_FLOAT_DATA::ID => {
34553                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
34554            }
34555            NAMED_VALUE_INT_DATA::ID => {
34556                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
34557            }
34558            NAV_CONTROLLER_OUTPUT_DATA::ID => {
34559                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
34560            }
34561            OBSTACLE_DISTANCE_DATA::ID => {
34562                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
34563            }
34564            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
34565            ONBOARD_COMPUTER_STATUS_DATA::ID => {
34566                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
34567                    .map(Self::ONBOARD_COMPUTER_STATUS)
34568            }
34569            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
34570                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
34571                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
34572            }
34573            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
34574                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
34575                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
34576            }
34577            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
34578                .map(Self::OPEN_DRONE_ID_BASIC_ID),
34579            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
34580                .map(Self::OPEN_DRONE_ID_LOCATION),
34581            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
34582                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
34583                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
34584            }
34585            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
34586                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
34587                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
34588            }
34589            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
34590                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
34591            }
34592            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
34593                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
34594            }
34595            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
34596                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
34597                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
34598            }
34599            OPTICAL_FLOW_DATA::ID => {
34600                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
34601            }
34602            OPTICAL_FLOW_RAD_DATA::ID => {
34603                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
34604            }
34605            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
34606                .map(Self::ORBIT_EXECUTION_STATUS),
34607            PARAM_EXT_ACK_DATA::ID => {
34608                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
34609            }
34610            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
34611                .map(Self::PARAM_EXT_REQUEST_LIST),
34612            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
34613                .map(Self::PARAM_EXT_REQUEST_READ),
34614            PARAM_EXT_SET_DATA::ID => {
34615                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
34616            }
34617            PARAM_EXT_VALUE_DATA::ID => {
34618                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
34619            }
34620            PARAM_MAP_RC_DATA::ID => {
34621                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
34622            }
34623            PARAM_REQUEST_LIST_DATA::ID => {
34624                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
34625            }
34626            PARAM_REQUEST_READ_DATA::ID => {
34627                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
34628            }
34629            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
34630            PARAM_VALUE_DATA::ID => {
34631                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
34632            }
34633            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
34634            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
34635            PLAY_TUNE_V2_DATA::ID => {
34636                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
34637            }
34638            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34639                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34640                    .map(Self::POSITION_TARGET_GLOBAL_INT)
34641            }
34642            POSITION_TARGET_LOCAL_NED_DATA::ID => {
34643                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34644                    .map(Self::POSITION_TARGET_LOCAL_NED)
34645            }
34646            POWER_STATUS_DATA::ID => {
34647                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
34648            }
34649            PROTOCOL_VERSION_DATA::ID => {
34650                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
34651            }
34652            RADIO_STATUS_DATA::ID => {
34653                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
34654            }
34655            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
34656            RAW_PRESSURE_DATA::ID => {
34657                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
34658            }
34659            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
34660            RC_CHANNELS_DATA::ID => {
34661                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
34662            }
34663            RC_CHANNELS_OVERRIDE_DATA::ID => {
34664                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
34665            }
34666            RC_CHANNELS_RAW_DATA::ID => {
34667                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
34668            }
34669            RC_CHANNELS_SCALED_DATA::ID => {
34670                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
34671            }
34672            REQUEST_DATA_STREAM_DATA::ID => {
34673                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
34674            }
34675            REQUEST_EVENT_DATA::ID => {
34676                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
34677            }
34678            RESOURCE_REQUEST_DATA::ID => {
34679                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
34680            }
34681            RESPONSE_EVENT_ERROR_DATA::ID => {
34682                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
34683            }
34684            SAFETY_ALLOWED_AREA_DATA::ID => {
34685                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
34686            }
34687            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
34688                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
34689                    .map(Self::SAFETY_SET_ALLOWED_AREA)
34690            }
34691            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
34692            SCALED_IMU2_DATA::ID => {
34693                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
34694            }
34695            SCALED_IMU3_DATA::ID => {
34696                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
34697            }
34698            SCALED_PRESSURE_DATA::ID => {
34699                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
34700            }
34701            SCALED_PRESSURE2_DATA::ID => {
34702                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
34703            }
34704            SCALED_PRESSURE3_DATA::ID => {
34705                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
34706            }
34707            SERIAL_CONTROL_DATA::ID => {
34708                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
34709            }
34710            SERVO_OUTPUT_RAW_DATA::ID => {
34711                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
34712            }
34713            SETUP_SIGNING_DATA::ID => {
34714                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34715            }
34716            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34717                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34718                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34719            }
34720            SET_ATTITUDE_TARGET_DATA::ID => {
34721                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34722            }
34723            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34724                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34725            }
34726            SET_HOME_POSITION_DATA::ID => {
34727                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34728            }
34729            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34730            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34731                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34732                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34733            }
34734            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34735                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34736                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34737            }
34738            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34739            SMART_BATTERY_INFO_DATA::ID => {
34740                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34741            }
34742            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34743            STORAGE_INFORMATION_DATA::ID => {
34744                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34745            }
34746            SUPPORTED_TUNES_DATA::ID => {
34747                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34748            }
34749            SYSTEM_TIME_DATA::ID => {
34750                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34751            }
34752            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34753            TERRAIN_CHECK_DATA::ID => {
34754                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34755            }
34756            TERRAIN_DATA_DATA::ID => {
34757                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34758            }
34759            TERRAIN_REPORT_DATA::ID => {
34760                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34761            }
34762            TERRAIN_REQUEST_DATA::ID => {
34763                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34764            }
34765            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34766            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34767                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34768                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34769            }
34770            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34771                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34772                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34773            }
34774            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34775                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34776                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34777            }
34778            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34779            UAVCAN_NODE_INFO_DATA::ID => {
34780                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34781            }
34782            UAVCAN_NODE_STATUS_DATA::ID => {
34783                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34784            }
34785            UAVIONIX_ADSB_GET_DATA::ID => {
34786                UAVIONIX_ADSB_GET_DATA::deser(version, payload).map(Self::UAVIONIX_ADSB_GET)
34787            }
34788            UAVIONIX_ADSB_OUT_CFG_DATA::ID => {
34789                UAVIONIX_ADSB_OUT_CFG_DATA::deser(version, payload).map(Self::UAVIONIX_ADSB_OUT_CFG)
34790            }
34791            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => {
34792                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::deser(version, payload)
34793                    .map(Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID)
34794            }
34795            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
34796                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::deser(version, payload)
34797                    .map(Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION)
34798            }
34799            UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => {
34800                UAVIONIX_ADSB_OUT_CONTROL_DATA::deser(version, payload)
34801                    .map(Self::UAVIONIX_ADSB_OUT_CONTROL)
34802            }
34803            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => {
34804                UAVIONIX_ADSB_OUT_DYNAMIC_DATA::deser(version, payload)
34805                    .map(Self::UAVIONIX_ADSB_OUT_DYNAMIC)
34806            }
34807            UAVIONIX_ADSB_OUT_STATUS_DATA::ID => {
34808                UAVIONIX_ADSB_OUT_STATUS_DATA::deser(version, payload)
34809                    .map(Self::UAVIONIX_ADSB_OUT_STATUS)
34810            }
34811            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
34812                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::deser(version, payload)
34813                    .map(Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT)
34814            }
34815            UTM_GLOBAL_POSITION_DATA::ID => {
34816                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34817            }
34818            V2_EXTENSION_DATA::ID => {
34819                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34820            }
34821            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34822            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34823            VICON_POSITION_ESTIMATE_DATA::ID => {
34824                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34825                    .map(Self::VICON_POSITION_ESTIMATE)
34826            }
34827            VIDEO_STREAM_INFORMATION_DATA::ID => {
34828                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34829                    .map(Self::VIDEO_STREAM_INFORMATION)
34830            }
34831            VIDEO_STREAM_STATUS_DATA::ID => {
34832                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34833            }
34834            VISION_POSITION_ESTIMATE_DATA::ID => {
34835                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34836                    .map(Self::VISION_POSITION_ESTIMATE)
34837            }
34838            VISION_SPEED_ESTIMATE_DATA::ID => {
34839                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34840            }
34841            WHEEL_DISTANCE_DATA::ID => {
34842                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34843            }
34844            WIFI_CONFIG_AP_DATA::ID => {
34845                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34846            }
34847            WINCH_STATUS_DATA::ID => {
34848                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34849            }
34850            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34851            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34852        }
34853    }
34854    fn message_name(&self) -> &'static str {
34855        match self {
34856            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34857            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34858            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34859            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34860            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34861            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34862            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34863            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34864            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34865            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34866            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34867            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34868                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34869            }
34870            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34871            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34872            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34873            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34874            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34875            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34876            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34877            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34878            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34879            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34880            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34881            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34882            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34883            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34884            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34885            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34886            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34887            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34888            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34889            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34890            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34891            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34892            Self::COLLISION(..) => COLLISION_DATA::NAME,
34893            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34894            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34895            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34896            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34897            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34898            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34899            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34900            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34901            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34902            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34903            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34904            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34905            Self::DEBUG(..) => DEBUG_DATA::NAME,
34906            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34907            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34908            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34909            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34910            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34911            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34912            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34913            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34914            Self::EVENT(..) => EVENT_DATA::NAME,
34915            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34916            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34917            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34918            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34919            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34920            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34921            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34922            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34923            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34924            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34925            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34926            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34927            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34928                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34929            }
34930            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34931            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34932            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34933            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34934            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34935            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34936            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34937            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34938            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34939            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34940            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34941            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34942            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34943            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34944            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34945            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34946            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34947            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34948            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34949            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34950            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34951            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34952            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34953            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34954            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34955            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34956            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34957            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34958            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34959            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34960            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34961            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34962            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34963            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34964            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34965                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34966            }
34967            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34968            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34969            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34970            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34971            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34972            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34973            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34974            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34975            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34976            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34977            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34978            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34979            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34980            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34981            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34982            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34983            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34984            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34985            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34986            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34987            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34988            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34989            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34990            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34991            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34992            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34993            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34994            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34995            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34996            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34997            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34998            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34999            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
35000            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
35001            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
35002            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
35003            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
35004            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
35005            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
35006            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
35007            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
35008            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
35009            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
35010            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
35011            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
35012            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
35013            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
35014            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
35015            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
35016            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
35017            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
35018            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
35019            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
35020            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
35021            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
35022            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
35023            Self::PING(..) => PING_DATA::NAME,
35024            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
35025            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
35026            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35027            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
35028            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
35029            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
35030            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
35031            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
35032            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
35033            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
35034            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
35035            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
35036            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
35037            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
35038            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
35039            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
35040            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
35041            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
35042            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
35043            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
35044            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
35045            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
35046            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
35047            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
35048            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
35049            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
35050            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
35051            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
35052            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
35053            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
35054            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
35055            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
35056            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
35057            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
35058            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35059            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
35060            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
35061            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
35062            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
35063            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
35064            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
35065            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
35066            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
35067            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
35068            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
35069            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
35070            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
35071            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
35072            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
35073            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
35074                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
35075            }
35076            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35077                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
35078            }
35079            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
35080            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
35081            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
35082            Self::UAVIONIX_ADSB_GET(..) => UAVIONIX_ADSB_GET_DATA::NAME,
35083            Self::UAVIONIX_ADSB_OUT_CFG(..) => UAVIONIX_ADSB_OUT_CFG_DATA::NAME,
35084            Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(..) => UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::NAME,
35085            Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(..) => {
35086                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::NAME
35087            }
35088            Self::UAVIONIX_ADSB_OUT_CONTROL(..) => UAVIONIX_ADSB_OUT_CONTROL_DATA::NAME,
35089            Self::UAVIONIX_ADSB_OUT_DYNAMIC(..) => UAVIONIX_ADSB_OUT_DYNAMIC_DATA::NAME,
35090            Self::UAVIONIX_ADSB_OUT_STATUS(..) => UAVIONIX_ADSB_OUT_STATUS_DATA::NAME,
35091            Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(..) => {
35092                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::NAME
35093            }
35094            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
35095            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
35096            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
35097            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
35098            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
35099            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
35100            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
35101            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
35102            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
35103            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
35104            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
35105            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
35106            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
35107        }
35108    }
35109    fn message_id(&self) -> u32 {
35110        match self {
35111            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
35112            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
35113            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
35114            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
35115            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
35116            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
35117            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
35118            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
35119            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
35120            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
35121            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
35122            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35123                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
35124            }
35125            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
35126            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
35127            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
35128            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
35129            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
35130            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
35131            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
35132            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
35133            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
35134            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
35135            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
35136            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
35137            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
35138            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
35139            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
35140            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
35141            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
35142            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
35143            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
35144            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
35145            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
35146            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
35147            Self::COLLISION(..) => COLLISION_DATA::ID,
35148            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
35149            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
35150            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
35151            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
35152            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
35153            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
35154            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
35155            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
35156            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
35157            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
35158            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
35159            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
35160            Self::DEBUG(..) => DEBUG_DATA::ID,
35161            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
35162            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
35163            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
35164            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
35165            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
35166            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
35167            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
35168            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
35169            Self::EVENT(..) => EVENT_DATA::ID,
35170            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
35171            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
35172            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
35173            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
35174            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
35175            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
35176            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
35177            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
35178            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
35179            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
35180            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
35181            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
35182            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
35183                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
35184            }
35185            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
35186            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
35187            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
35188            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
35189            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
35190            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
35191            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
35192            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
35193            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
35194            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
35195            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
35196            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
35197            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
35198            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
35199            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
35200            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
35201            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
35202            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
35203            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
35204            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
35205            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
35206            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
35207            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
35208            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
35209            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
35210            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
35211            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
35212            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
35213            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
35214            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
35215            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
35216            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
35217            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
35218            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
35219            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
35220                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
35221            }
35222            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
35223            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
35224            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
35225            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
35226            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
35227            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
35228            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
35229            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
35230            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
35231            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
35232            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
35233            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
35234            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
35235            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
35236            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
35237            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
35238            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
35239            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
35240            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
35241            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
35242            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
35243            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
35244            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
35245            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
35246            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
35247            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
35248            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
35249            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
35250            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
35251            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
35252            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
35253            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
35254            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
35255            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
35256            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
35257            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
35258            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
35259            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
35260            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
35261            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
35262            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
35263            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
35264            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
35265            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
35266            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
35267            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
35268            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
35269            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
35270            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
35271            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
35272            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
35273            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
35274            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
35275            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
35276            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
35277            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
35278            Self::PING(..) => PING_DATA::ID,
35279            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
35280            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
35281            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
35282            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
35283            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
35284            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
35285            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
35286            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
35287            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
35288            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
35289            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
35290            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
35291            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
35292            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
35293            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
35294            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
35295            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
35296            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
35297            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
35298            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
35299            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
35300            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
35301            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
35302            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
35303            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
35304            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
35305            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
35306            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
35307            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
35308            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
35309            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
35310            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
35311            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
35312            Self::SET_MODE(..) => SET_MODE_DATA::ID,
35313            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
35314            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
35315            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
35316            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
35317            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
35318            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
35319            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
35320            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
35321            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
35322            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
35323            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
35324            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
35325            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
35326            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
35327            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
35328            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
35329            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35330                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
35331            }
35332            Self::TUNNEL(..) => TUNNEL_DATA::ID,
35333            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
35334            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
35335            Self::UAVIONIX_ADSB_GET(..) => UAVIONIX_ADSB_GET_DATA::ID,
35336            Self::UAVIONIX_ADSB_OUT_CFG(..) => UAVIONIX_ADSB_OUT_CFG_DATA::ID,
35337            Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(..) => UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID,
35338            Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(..) => {
35339                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID
35340            }
35341            Self::UAVIONIX_ADSB_OUT_CONTROL(..) => UAVIONIX_ADSB_OUT_CONTROL_DATA::ID,
35342            Self::UAVIONIX_ADSB_OUT_DYNAMIC(..) => UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID,
35343            Self::UAVIONIX_ADSB_OUT_STATUS(..) => UAVIONIX_ADSB_OUT_STATUS_DATA::ID,
35344            Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(..) => {
35345                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID
35346            }
35347            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
35348            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
35349            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
35350            Self::VIBRATION(..) => VIBRATION_DATA::ID,
35351            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
35352            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
35353            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
35354            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
35355            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
35356            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
35357            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
35358            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
35359            Self::WIND_COV(..) => WIND_COV_DATA::ID,
35360        }
35361    }
35362    fn message_id_from_name(name: &str) -> Option<u32> {
35363        match name {
35364            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
35365            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
35366            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
35367            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
35368            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
35369            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
35370            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
35371            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
35372            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
35373            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
35374            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
35375            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
35376                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
35377            }
35378            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
35379            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
35380            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
35381            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
35382            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
35383            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
35384            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
35385            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
35386            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
35387            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
35388            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
35389            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
35390            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
35391            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
35392            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
35393            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
35394            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
35395            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
35396            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
35397            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
35398            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
35399            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
35400            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
35401            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
35402            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
35403            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
35404            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
35405            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
35406            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
35407            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
35408            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
35409            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
35410            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
35411            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
35412            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
35413            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
35414            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
35415            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
35416            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
35417            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
35418            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
35419            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
35420            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
35421            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
35422            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
35423            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
35424            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
35425            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
35426            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
35427            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
35428            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
35429            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
35430            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
35431                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
35432            }
35433            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
35434            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
35435            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
35436            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
35437            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
35438                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
35439            }
35440            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
35441            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
35442            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
35443            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
35444            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
35445                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
35446            }
35447            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
35448            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
35449            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
35450            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
35451            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
35452            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
35453            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
35454            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
35455            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
35456            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
35457            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
35458            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
35459            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
35460            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
35461            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
35462            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
35463            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
35464            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
35465            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
35466            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
35467            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
35468            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
35469            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
35470            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
35471            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
35472            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
35473            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
35474            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
35475            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
35476            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
35477                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
35478            }
35479            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
35480            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
35481            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
35482            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
35483            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
35484            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
35485            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
35486            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
35487            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
35488            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
35489            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
35490            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
35491            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
35492            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
35493            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
35494            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
35495            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
35496            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
35497            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
35498            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
35499            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
35500            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
35501            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
35502            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
35503            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
35504            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
35505            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
35506            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
35507            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
35508            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
35509            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
35510            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
35511            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
35512            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
35513            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
35514            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
35515            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
35516            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
35517            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
35518            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
35519            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
35520            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
35521            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
35522            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
35523            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
35524            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
35525            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
35526            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
35527            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
35528            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
35529            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
35530            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
35531            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
35532            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
35533            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
35534            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
35535            PING_DATA::NAME => Some(PING_DATA::ID),
35536            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
35537            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
35538            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
35539            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
35540            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
35541            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
35542            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
35543            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
35544            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
35545            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
35546            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
35547            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
35548            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
35549            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
35550            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
35551            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
35552            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
35553            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
35554            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
35555            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
35556            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
35557            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
35558            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
35559            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
35560            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
35561            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
35562            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
35563            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
35564            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
35565            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
35566            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
35567            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
35568            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
35569            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
35570            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
35571                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
35572            }
35573            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
35574                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
35575            }
35576            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
35577            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
35578            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
35579            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
35580            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
35581            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
35582            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
35583            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
35584            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
35585            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
35586            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
35587            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
35588            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
35589            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
35590                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
35591            }
35592            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
35593                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
35594            }
35595            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
35596            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
35597            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
35598            UAVIONIX_ADSB_GET_DATA::NAME => Some(UAVIONIX_ADSB_GET_DATA::ID),
35599            UAVIONIX_ADSB_OUT_CFG_DATA::NAME => Some(UAVIONIX_ADSB_OUT_CFG_DATA::ID),
35600            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::NAME => {
35601                Some(UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID)
35602            }
35603            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::NAME => {
35604                Some(UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID)
35605            }
35606            UAVIONIX_ADSB_OUT_CONTROL_DATA::NAME => Some(UAVIONIX_ADSB_OUT_CONTROL_DATA::ID),
35607            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::NAME => Some(UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID),
35608            UAVIONIX_ADSB_OUT_STATUS_DATA::NAME => Some(UAVIONIX_ADSB_OUT_STATUS_DATA::ID),
35609            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::NAME => {
35610                Some(UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID)
35611            }
35612            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
35613            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
35614            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
35615            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
35616            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
35617            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
35618            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
35619            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
35620            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
35621            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
35622            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
35623            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
35624            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
35625            _ => None,
35626        }
35627    }
35628    fn default_message_from_id(id: u32) -> Option<Self> {
35629        match id {
35630            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35631                ACTUATOR_CONTROL_TARGET_DATA::default(),
35632            )),
35633            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35634                ACTUATOR_OUTPUT_STATUS_DATA::default(),
35635            )),
35636            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
35637            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
35638            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
35639            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
35640            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35641                ATTITUDE_QUATERNION_DATA::default(),
35642            )),
35643            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35644                ATTITUDE_QUATERNION_COV_DATA::default(),
35645            )),
35646            ATTITUDE_TARGET_DATA::ID => {
35647                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
35648            }
35649            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
35650            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
35651            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35652                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35653                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
35654                ))
35655            }
35656            AUTOPILOT_VERSION_DATA::ID => {
35657                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
35658            }
35659            AVAILABLE_MODES_DATA::ID => {
35660                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
35661            }
35662            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35663                AVAILABLE_MODES_MONITOR_DATA::default(),
35664            )),
35665            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
35666            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
35667            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
35668            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35669                CAMERA_CAPTURE_STATUS_DATA::default(),
35670            )),
35671            CAMERA_FOV_STATUS_DATA::ID => {
35672                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
35673            }
35674            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35675                CAMERA_IMAGE_CAPTURED_DATA::default(),
35676            )),
35677            CAMERA_INFORMATION_DATA::ID => {
35678                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
35679            }
35680            CAMERA_SETTINGS_DATA::ID => {
35681                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
35682            }
35683            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35684                CAMERA_THERMAL_RANGE_DATA::default(),
35685            )),
35686            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35687                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
35688            )),
35689            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35690                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
35691            )),
35692            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
35693            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
35694            CAN_FILTER_MODIFY_DATA::ID => {
35695                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
35696            }
35697            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
35698            CELLULAR_CONFIG_DATA::ID => {
35699                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
35700            }
35701            CELLULAR_STATUS_DATA::ID => {
35702                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
35703            }
35704            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35705                CHANGE_OPERATOR_CONTROL_DATA::default(),
35706            )),
35707            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35708                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
35709            )),
35710            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
35711            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
35712            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
35713            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
35714            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
35715            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35716                COMPONENT_INFORMATION_DATA::default(),
35717            )),
35718            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35719                COMPONENT_INFORMATION_BASIC_DATA::default(),
35720            )),
35721            COMPONENT_METADATA_DATA::ID => {
35722                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
35723            }
35724            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35725                CONTROL_SYSTEM_STATE_DATA::default(),
35726            )),
35727            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35728                CURRENT_EVENT_SEQUENCE_DATA::default(),
35729            )),
35730            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
35731            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
35732            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35733                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
35734            )),
35735            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
35736            DEBUG_FLOAT_ARRAY_DATA::ID => {
35737                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
35738            }
35739            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
35740            DISTANCE_SENSOR_DATA::ID => {
35741                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
35742            }
35743            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
35744            ENCAPSULATED_DATA_DATA::ID => {
35745                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
35746            }
35747            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
35748            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
35749            ESTIMATOR_STATUS_DATA::ID => {
35750                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
35751            }
35752            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
35753            EXTENDED_SYS_STATE_DATA::ID => {
35754                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
35755            }
35756            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
35757            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35758                FILE_TRANSFER_PROTOCOL_DATA::default(),
35759            )),
35760            FLIGHT_INFORMATION_DATA::ID => {
35761                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
35762            }
35763            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
35764            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
35765            GENERATOR_STATUS_DATA::ID => {
35766                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
35767            }
35768            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35769                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35770            )),
35771            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35772                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35773            )),
35774            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35775                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35776            )),
35777            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35778                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35779            )),
35780            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35781                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35782            )),
35783            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35784                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35785                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35786                ))
35787            }
35788            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35789                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35790            )),
35791            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35792                GIMBAL_MANAGER_STATUS_DATA::default(),
35793            )),
35794            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35795                GLOBAL_POSITION_INT_DATA::default(),
35796            )),
35797            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35798                GLOBAL_POSITION_INT_COV_DATA::default(),
35799            )),
35800            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35801                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35802                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35803                ))
35804            }
35805            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35806            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35807            GPS_GLOBAL_ORIGIN_DATA::ID => {
35808                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35809            }
35810            GPS_INJECT_DATA_DATA::ID => {
35811                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35812            }
35813            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35814            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35815            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35816            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35817            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35818            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35819            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35820            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35821            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35822            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35823                HIL_ACTUATOR_CONTROLS_DATA::default(),
35824            )),
35825            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35826            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35827            HIL_OPTICAL_FLOW_DATA::ID => {
35828                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35829            }
35830            HIL_RC_INPUTS_RAW_DATA::ID => {
35831                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35832            }
35833            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35834            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35835            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35836                HIL_STATE_QUATERNION_DATA::default(),
35837            )),
35838            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35839            HYGROMETER_SENSOR_DATA::ID => {
35840                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35841            }
35842            ILLUMINATOR_STATUS_DATA::ID => {
35843                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35844            }
35845            ISBD_LINK_STATUS_DATA::ID => {
35846                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35847            }
35848            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35849            LINK_NODE_STATUS_DATA::ID => {
35850                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35851            }
35852            LOCAL_POSITION_NED_DATA::ID => {
35853                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35854            }
35855            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35856                LOCAL_POSITION_NED_COV_DATA::default(),
35857            )),
35858            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35859                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35860                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35861                ))
35862            }
35863            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35864            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35865            LOGGING_DATA_ACKED_DATA::ID => {
35866                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35867            }
35868            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35869            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35870            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35871            LOG_REQUEST_DATA_DATA::ID => {
35872                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35873            }
35874            LOG_REQUEST_END_DATA::ID => {
35875                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35876            }
35877            LOG_REQUEST_LIST_DATA::ID => {
35878                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35879            }
35880            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35881            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35882            MANUAL_SETPOINT_DATA::ID => {
35883                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35884            }
35885            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35886            MESSAGE_INTERVAL_DATA::ID => {
35887                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35888            }
35889            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35890            MISSION_CLEAR_ALL_DATA::ID => {
35891                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35892            }
35893            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35894            MISSION_CURRENT_DATA::ID => {
35895                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35896            }
35897            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35898            MISSION_ITEM_INT_DATA::ID => {
35899                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35900            }
35901            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35902                MISSION_ITEM_REACHED_DATA::default(),
35903            )),
35904            MISSION_REQUEST_DATA::ID => {
35905                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35906            }
35907            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35908                MISSION_REQUEST_INT_DATA::default(),
35909            )),
35910            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35911                MISSION_REQUEST_LIST_DATA::default(),
35912            )),
35913            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35914                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35915            )),
35916            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35917                MISSION_SET_CURRENT_DATA::default(),
35918            )),
35919            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35920                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35921            )),
35922            MOUNT_ORIENTATION_DATA::ID => {
35923                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35924            }
35925            NAMED_VALUE_FLOAT_DATA::ID => {
35926                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35927            }
35928            NAMED_VALUE_INT_DATA::ID => {
35929                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35930            }
35931            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35932                NAV_CONTROLLER_OUTPUT_DATA::default(),
35933            )),
35934            OBSTACLE_DISTANCE_DATA::ID => {
35935                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35936            }
35937            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35938            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35939                ONBOARD_COMPUTER_STATUS_DATA::default(),
35940            )),
35941            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35942                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35943            )),
35944            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35945                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35946            )),
35947            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35948                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35949            )),
35950            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35951                OPEN_DRONE_ID_LOCATION_DATA::default(),
35952            )),
35953            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35954                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35955            )),
35956            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35957                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35958            )),
35959            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35960                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35961            )),
35962            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35963                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35964            )),
35965            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35966                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35967            )),
35968            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35969            OPTICAL_FLOW_RAD_DATA::ID => {
35970                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35971            }
35972            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35973                ORBIT_EXECUTION_STATUS_DATA::default(),
35974            )),
35975            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35976            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35977                PARAM_EXT_REQUEST_LIST_DATA::default(),
35978            )),
35979            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35980                PARAM_EXT_REQUEST_READ_DATA::default(),
35981            )),
35982            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35983            PARAM_EXT_VALUE_DATA::ID => {
35984                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35985            }
35986            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35987            PARAM_REQUEST_LIST_DATA::ID => {
35988                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35989            }
35990            PARAM_REQUEST_READ_DATA::ID => {
35991                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35992            }
35993            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35994            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35995            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35996            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35997            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35998            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35999                POSITION_TARGET_GLOBAL_INT_DATA::default(),
36000            )),
36001            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36002                POSITION_TARGET_LOCAL_NED_DATA::default(),
36003            )),
36004            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
36005            PROTOCOL_VERSION_DATA::ID => {
36006                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
36007            }
36008            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
36009            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
36010            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
36011            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
36012            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
36013            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36014                RC_CHANNELS_OVERRIDE_DATA::default(),
36015            )),
36016            RC_CHANNELS_RAW_DATA::ID => {
36017                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
36018            }
36019            RC_CHANNELS_SCALED_DATA::ID => {
36020                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
36021            }
36022            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36023                REQUEST_DATA_STREAM_DATA::default(),
36024            )),
36025            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
36026            RESOURCE_REQUEST_DATA::ID => {
36027                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
36028            }
36029            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36030                RESPONSE_EVENT_ERROR_DATA::default(),
36031            )),
36032            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36033                SAFETY_ALLOWED_AREA_DATA::default(),
36034            )),
36035            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36036                SAFETY_SET_ALLOWED_AREA_DATA::default(),
36037            )),
36038            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
36039            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
36040            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
36041            SCALED_PRESSURE_DATA::ID => {
36042                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
36043            }
36044            SCALED_PRESSURE2_DATA::ID => {
36045                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
36046            }
36047            SCALED_PRESSURE3_DATA::ID => {
36048                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
36049            }
36050            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
36051            SERVO_OUTPUT_RAW_DATA::ID => {
36052                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
36053            }
36054            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
36055            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36056                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
36057            )),
36058            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36059                SET_ATTITUDE_TARGET_DATA::default(),
36060            )),
36061            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36062                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
36063            )),
36064            SET_HOME_POSITION_DATA::ID => {
36065                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
36066            }
36067            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
36068            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36069                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
36070            )),
36071            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36072                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
36073            )),
36074            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
36075            SMART_BATTERY_INFO_DATA::ID => {
36076                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
36077            }
36078            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
36079            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36080                STORAGE_INFORMATION_DATA::default(),
36081            )),
36082            SUPPORTED_TUNES_DATA::ID => {
36083                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
36084            }
36085            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
36086            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
36087            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
36088            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
36089            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
36090            TERRAIN_REQUEST_DATA::ID => {
36091                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
36092            }
36093            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
36094            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36095                TIME_ESTIMATE_TO_TARGET_DATA::default(),
36096            )),
36097            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36098                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36099                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
36100                ))
36101            }
36102            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36103                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36104                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
36105                ))
36106            }
36107            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
36108            UAVCAN_NODE_INFO_DATA::ID => {
36109                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
36110            }
36111            UAVCAN_NODE_STATUS_DATA::ID => {
36112                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
36113            }
36114            UAVIONIX_ADSB_GET_DATA::ID => {
36115                Some(Self::UAVIONIX_ADSB_GET(UAVIONIX_ADSB_GET_DATA::default()))
36116            }
36117            UAVIONIX_ADSB_OUT_CFG_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG(
36118                UAVIONIX_ADSB_OUT_CFG_DATA::default(),
36119            )),
36120            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(
36121                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::default(),
36122            )),
36123            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
36124                Some(Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(
36125                    UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::default(),
36126                ))
36127            }
36128            UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CONTROL(
36129                UAVIONIX_ADSB_OUT_CONTROL_DATA::default(),
36130            )),
36131            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_DYNAMIC(
36132                UAVIONIX_ADSB_OUT_DYNAMIC_DATA::default(),
36133            )),
36134            UAVIONIX_ADSB_OUT_STATUS_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_STATUS(
36135                UAVIONIX_ADSB_OUT_STATUS_DATA::default(),
36136            )),
36137            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
36138                Some(Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(
36139                    UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::default(),
36140                ))
36141            }
36142            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36143                UTM_GLOBAL_POSITION_DATA::default(),
36144            )),
36145            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
36146            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
36147            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
36148            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36149                VICON_POSITION_ESTIMATE_DATA::default(),
36150            )),
36151            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36152                VIDEO_STREAM_INFORMATION_DATA::default(),
36153            )),
36154            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36155                VIDEO_STREAM_STATUS_DATA::default(),
36156            )),
36157            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36158                VISION_POSITION_ESTIMATE_DATA::default(),
36159            )),
36160            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36161                VISION_SPEED_ESTIMATE_DATA::default(),
36162            )),
36163            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
36164            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
36165            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
36166            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
36167            _ => None,
36168        }
36169    }
36170    #[cfg(feature = "arbitrary")]
36171    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
36172        match id {
36173            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
36174                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
36175            )),
36176            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
36177                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
36178            )),
36179            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
36180            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
36181            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
36182            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
36183            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
36184                ATTITUDE_QUATERNION_DATA::random(rng),
36185            )),
36186            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
36187                ATTITUDE_QUATERNION_COV_DATA::random(rng),
36188            )),
36189            ATTITUDE_TARGET_DATA::ID => {
36190                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
36191            }
36192            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
36193            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
36194            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36195                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
36196                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
36197                ))
36198            }
36199            AUTOPILOT_VERSION_DATA::ID => {
36200                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
36201            }
36202            AVAILABLE_MODES_DATA::ID => {
36203                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
36204            }
36205            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
36206                AVAILABLE_MODES_MONITOR_DATA::random(rng),
36207            )),
36208            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
36209            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
36210            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
36211            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
36212                CAMERA_CAPTURE_STATUS_DATA::random(rng),
36213            )),
36214            CAMERA_FOV_STATUS_DATA::ID => {
36215                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
36216            }
36217            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
36218                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
36219            )),
36220            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
36221                CAMERA_INFORMATION_DATA::random(rng),
36222            )),
36223            CAMERA_SETTINGS_DATA::ID => {
36224                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
36225            }
36226            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36227                CAMERA_THERMAL_RANGE_DATA::random(rng),
36228            )),
36229            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36230                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
36231            )),
36232            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36233                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
36234            )),
36235            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
36236            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
36237            CAN_FILTER_MODIFY_DATA::ID => {
36238                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
36239            }
36240            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
36241            CELLULAR_CONFIG_DATA::ID => {
36242                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
36243            }
36244            CELLULAR_STATUS_DATA::ID => {
36245                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
36246            }
36247            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36248                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
36249            )),
36250            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36251                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
36252            )),
36253            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
36254            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
36255            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
36256            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
36257            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
36258            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36259                COMPONENT_INFORMATION_DATA::random(rng),
36260            )),
36261            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36262                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
36263            )),
36264            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
36265                COMPONENT_METADATA_DATA::random(rng),
36266            )),
36267            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36268                CONTROL_SYSTEM_STATE_DATA::random(rng),
36269            )),
36270            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36271                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
36272            )),
36273            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
36274            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
36275            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36276                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
36277            )),
36278            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
36279            DEBUG_FLOAT_ARRAY_DATA::ID => {
36280                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
36281            }
36282            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
36283            DISTANCE_SENSOR_DATA::ID => {
36284                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
36285            }
36286            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
36287            ENCAPSULATED_DATA_DATA::ID => {
36288                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
36289            }
36290            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
36291            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
36292            ESTIMATOR_STATUS_DATA::ID => {
36293                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
36294            }
36295            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
36296            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
36297                EXTENDED_SYS_STATE_DATA::random(rng),
36298            )),
36299            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
36300            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36301                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
36302            )),
36303            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
36304                FLIGHT_INFORMATION_DATA::random(rng),
36305            )),
36306            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
36307            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
36308            GENERATOR_STATUS_DATA::ID => {
36309                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
36310            }
36311            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36312                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
36313            )),
36314            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36315                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
36316            )),
36317            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36318                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
36319            )),
36320            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36321                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
36322            )),
36323            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36324                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
36325            )),
36326            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36327                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36328                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
36329                ))
36330            }
36331            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36332                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
36333            )),
36334            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36335                GIMBAL_MANAGER_STATUS_DATA::random(rng),
36336            )),
36337            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36338                GLOBAL_POSITION_INT_DATA::random(rng),
36339            )),
36340            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36341                GLOBAL_POSITION_INT_COV_DATA::random(rng),
36342            )),
36343            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36344                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36345                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
36346                ))
36347            }
36348            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
36349            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
36350            GPS_GLOBAL_ORIGIN_DATA::ID => {
36351                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
36352            }
36353            GPS_INJECT_DATA_DATA::ID => {
36354                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
36355            }
36356            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
36357            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
36358            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
36359            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
36360            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
36361            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
36362            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
36363            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
36364            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
36365            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36366                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
36367            )),
36368            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
36369            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
36370            HIL_OPTICAL_FLOW_DATA::ID => {
36371                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
36372            }
36373            HIL_RC_INPUTS_RAW_DATA::ID => {
36374                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
36375            }
36376            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
36377            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
36378            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36379                HIL_STATE_QUATERNION_DATA::random(rng),
36380            )),
36381            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
36382            HYGROMETER_SENSOR_DATA::ID => {
36383                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
36384            }
36385            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
36386                ILLUMINATOR_STATUS_DATA::random(rng),
36387            )),
36388            ISBD_LINK_STATUS_DATA::ID => {
36389                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
36390            }
36391            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
36392            LINK_NODE_STATUS_DATA::ID => {
36393                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
36394            }
36395            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
36396                LOCAL_POSITION_NED_DATA::random(rng),
36397            )),
36398            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36399                LOCAL_POSITION_NED_COV_DATA::random(rng),
36400            )),
36401            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36402                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36403                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
36404                ))
36405            }
36406            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
36407            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
36408            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
36409                LOGGING_DATA_ACKED_DATA::random(rng),
36410            )),
36411            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
36412            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
36413            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
36414            LOG_REQUEST_DATA_DATA::ID => {
36415                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
36416            }
36417            LOG_REQUEST_END_DATA::ID => {
36418                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
36419            }
36420            LOG_REQUEST_LIST_DATA::ID => {
36421                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
36422            }
36423            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
36424            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
36425            MANUAL_SETPOINT_DATA::ID => {
36426                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
36427            }
36428            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
36429            MESSAGE_INTERVAL_DATA::ID => {
36430                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
36431            }
36432            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
36433            MISSION_CLEAR_ALL_DATA::ID => {
36434                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
36435            }
36436            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
36437            MISSION_CURRENT_DATA::ID => {
36438                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
36439            }
36440            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
36441            MISSION_ITEM_INT_DATA::ID => {
36442                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
36443            }
36444            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36445                MISSION_ITEM_REACHED_DATA::random(rng),
36446            )),
36447            MISSION_REQUEST_DATA::ID => {
36448                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
36449            }
36450            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36451                MISSION_REQUEST_INT_DATA::random(rng),
36452            )),
36453            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36454                MISSION_REQUEST_LIST_DATA::random(rng),
36455            )),
36456            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36457                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
36458            )),
36459            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36460                MISSION_SET_CURRENT_DATA::random(rng),
36461            )),
36462            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36463                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
36464            )),
36465            MOUNT_ORIENTATION_DATA::ID => {
36466                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
36467            }
36468            NAMED_VALUE_FLOAT_DATA::ID => {
36469                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
36470            }
36471            NAMED_VALUE_INT_DATA::ID => {
36472                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
36473            }
36474            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36475                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
36476            )),
36477            OBSTACLE_DISTANCE_DATA::ID => {
36478                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
36479            }
36480            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
36481            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36482                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
36483            )),
36484            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36485                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
36486            )),
36487            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36488                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
36489            )),
36490            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36491                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
36492            )),
36493            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36494                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
36495            )),
36496            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36497                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
36498            )),
36499            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36500                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
36501            )),
36502            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36503                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
36504            )),
36505            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
36506                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
36507            )),
36508            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
36509                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
36510            )),
36511            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
36512            OPTICAL_FLOW_RAD_DATA::ID => {
36513                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
36514            }
36515            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
36516                ORBIT_EXECUTION_STATUS_DATA::random(rng),
36517            )),
36518            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
36519            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
36520                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
36521            )),
36522            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
36523                PARAM_EXT_REQUEST_READ_DATA::random(rng),
36524            )),
36525            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
36526            PARAM_EXT_VALUE_DATA::ID => {
36527                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
36528            }
36529            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
36530            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
36531                PARAM_REQUEST_LIST_DATA::random(rng),
36532            )),
36533            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
36534                PARAM_REQUEST_READ_DATA::random(rng),
36535            )),
36536            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
36537            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
36538            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
36539            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
36540            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
36541            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
36542                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36543            )),
36544            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36545                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36546            )),
36547            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
36548            PROTOCOL_VERSION_DATA::ID => {
36549                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
36550            }
36551            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
36552            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
36553            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
36554            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
36555            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
36556            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36557                RC_CHANNELS_OVERRIDE_DATA::random(rng),
36558            )),
36559            RC_CHANNELS_RAW_DATA::ID => {
36560                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
36561            }
36562            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
36563                RC_CHANNELS_SCALED_DATA::random(rng),
36564            )),
36565            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36566                REQUEST_DATA_STREAM_DATA::random(rng),
36567            )),
36568            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
36569            RESOURCE_REQUEST_DATA::ID => {
36570                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
36571            }
36572            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36573                RESPONSE_EVENT_ERROR_DATA::random(rng),
36574            )),
36575            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36576                SAFETY_ALLOWED_AREA_DATA::random(rng),
36577            )),
36578            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36579                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
36580            )),
36581            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
36582            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
36583            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
36584            SCALED_PRESSURE_DATA::ID => {
36585                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
36586            }
36587            SCALED_PRESSURE2_DATA::ID => {
36588                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
36589            }
36590            SCALED_PRESSURE3_DATA::ID => {
36591                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
36592            }
36593            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
36594            SERVO_OUTPUT_RAW_DATA::ID => {
36595                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
36596            }
36597            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
36598            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36599                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
36600            )),
36601            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36602                SET_ATTITUDE_TARGET_DATA::random(rng),
36603            )),
36604            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36605                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
36606            )),
36607            SET_HOME_POSITION_DATA::ID => {
36608                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
36609            }
36610            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
36611            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36612                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
36613            )),
36614            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36615                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
36616            )),
36617            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
36618            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
36619                SMART_BATTERY_INFO_DATA::random(rng),
36620            )),
36621            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
36622            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36623                STORAGE_INFORMATION_DATA::random(rng),
36624            )),
36625            SUPPORTED_TUNES_DATA::ID => {
36626                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
36627            }
36628            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
36629            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
36630            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
36631            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
36632            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
36633            TERRAIN_REQUEST_DATA::ID => {
36634                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
36635            }
36636            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
36637            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36638                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
36639            )),
36640            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36641                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36642                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
36643                ))
36644            }
36645            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36646                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36647                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
36648                ))
36649            }
36650            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
36651            UAVCAN_NODE_INFO_DATA::ID => {
36652                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
36653            }
36654            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
36655                UAVCAN_NODE_STATUS_DATA::random(rng),
36656            )),
36657            UAVIONIX_ADSB_GET_DATA::ID => {
36658                Some(Self::UAVIONIX_ADSB_GET(UAVIONIX_ADSB_GET_DATA::random(rng)))
36659            }
36660            UAVIONIX_ADSB_OUT_CFG_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG(
36661                UAVIONIX_ADSB_OUT_CFG_DATA::random(rng),
36662            )),
36663            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(
36664                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::random(rng),
36665            )),
36666            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
36667                Some(Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(
36668                    UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::random(rng),
36669                ))
36670            }
36671            UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_CONTROL(
36672                UAVIONIX_ADSB_OUT_CONTROL_DATA::random(rng),
36673            )),
36674            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_DYNAMIC(
36675                UAVIONIX_ADSB_OUT_DYNAMIC_DATA::random(rng),
36676            )),
36677            UAVIONIX_ADSB_OUT_STATUS_DATA::ID => Some(Self::UAVIONIX_ADSB_OUT_STATUS(
36678                UAVIONIX_ADSB_OUT_STATUS_DATA::random(rng),
36679            )),
36680            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
36681                Some(Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(
36682                    UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::random(rng),
36683                ))
36684            }
36685            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36686                UTM_GLOBAL_POSITION_DATA::random(rng),
36687            )),
36688            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
36689            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
36690            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
36691            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36692                VICON_POSITION_ESTIMATE_DATA::random(rng),
36693            )),
36694            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36695                VIDEO_STREAM_INFORMATION_DATA::random(rng),
36696            )),
36697            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36698                VIDEO_STREAM_STATUS_DATA::random(rng),
36699            )),
36700            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36701                VISION_POSITION_ESTIMATE_DATA::random(rng),
36702            )),
36703            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36704                VISION_SPEED_ESTIMATE_DATA::random(rng),
36705            )),
36706            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
36707            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
36708            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
36709            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
36710            _ => None,
36711        }
36712    }
36713    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36714        match self {
36715            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36716            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
36717            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
36718            Self::AIS_VESSEL(body) => body.ser(version, bytes),
36719            Self::ALTITUDE(body) => body.ser(version, bytes),
36720            Self::ATTITUDE(body) => body.ser(version, bytes),
36721            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
36722            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
36723            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
36724            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
36725            Self::AUTH_KEY(body) => body.ser(version, bytes),
36726            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
36727            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
36728            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
36729            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
36730            Self::BATTERY_INFO(body) => body.ser(version, bytes),
36731            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
36732            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
36733            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
36734            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
36735            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
36736            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
36737            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
36738            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
36739            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
36740            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
36741            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
36742            Self::CANFD_FRAME(body) => body.ser(version, bytes),
36743            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
36744            Self::CAN_FRAME(body) => body.ser(version, bytes),
36745            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
36746            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
36747            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
36748            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
36749            Self::COLLISION(body) => body.ser(version, bytes),
36750            Self::COMMAND_ACK(body) => body.ser(version, bytes),
36751            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
36752            Self::COMMAND_INT(body) => body.ser(version, bytes),
36753            Self::COMMAND_LONG(body) => body.ser(version, bytes),
36754            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
36755            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
36756            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
36757            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
36758            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
36759            Self::CURRENT_MODE(body) => body.ser(version, bytes),
36760            Self::DATA_STREAM(body) => body.ser(version, bytes),
36761            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
36762            Self::DEBUG(body) => body.ser(version, bytes),
36763            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
36764            Self::DEBUG_VECT(body) => body.ser(version, bytes),
36765            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
36766            Self::EFI_STATUS(body) => body.ser(version, bytes),
36767            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
36768            Self::ESC_INFO(body) => body.ser(version, bytes),
36769            Self::ESC_STATUS(body) => body.ser(version, bytes),
36770            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
36771            Self::EVENT(body) => body.ser(version, bytes),
36772            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
36773            Self::FENCE_STATUS(body) => body.ser(version, bytes),
36774            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
36775            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
36776            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
36777            Self::FUEL_STATUS(body) => body.ser(version, bytes),
36778            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
36779            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
36780            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
36781            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
36782            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
36783            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
36784            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
36785            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
36786            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
36787            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
36788            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
36789            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36790            Self::GPS2_RAW(body) => body.ser(version, bytes),
36791            Self::GPS2_RTK(body) => body.ser(version, bytes),
36792            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36793            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
36794            Self::GPS_INPUT(body) => body.ser(version, bytes),
36795            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
36796            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
36797            Self::GPS_RTK(body) => body.ser(version, bytes),
36798            Self::GPS_STATUS(body) => body.ser(version, bytes),
36799            Self::HEARTBEAT(body) => body.ser(version, bytes),
36800            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
36801            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
36802            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
36803            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
36804            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
36805            Self::HIL_GPS(body) => body.ser(version, bytes),
36806            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
36807            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
36808            Self::HIL_SENSOR(body) => body.ser(version, bytes),
36809            Self::HIL_STATE(body) => body.ser(version, bytes),
36810            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
36811            Self::HOME_POSITION(body) => body.ser(version, bytes),
36812            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
36813            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
36814            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
36815            Self::LANDING_TARGET(body) => body.ser(version, bytes),
36816            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
36817            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
36818            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
36819            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
36820            Self::LOGGING_ACK(body) => body.ser(version, bytes),
36821            Self::LOGGING_DATA(body) => body.ser(version, bytes),
36822            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
36823            Self::LOG_DATA(body) => body.ser(version, bytes),
36824            Self::LOG_ENTRY(body) => body.ser(version, bytes),
36825            Self::LOG_ERASE(body) => body.ser(version, bytes),
36826            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36827            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36828            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36829            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36830            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36831            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
36832            Self::MEMORY_VECT(body) => body.ser(version, bytes),
36833            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
36834            Self::MISSION_ACK(body) => body.ser(version, bytes),
36835            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
36836            Self::MISSION_COUNT(body) => body.ser(version, bytes),
36837            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
36838            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36839            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
36840            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
36841            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
36842            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
36843            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
36844            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
36845            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36846            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36847            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
36848            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36849            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36850            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
36851            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36852            Self::ODOMETRY(body) => body.ser(version, bytes),
36853            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36854            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
36855            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36856            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36857            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
36858            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
36859            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
36860            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36861            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36862            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
36863            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36864            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36865            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36866            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
36867            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
36868            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
36869            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
36870            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
36871            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36872            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
36873            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
36874            Self::PARAM_SET(body) => body.ser(version, bytes),
36875            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36876            Self::PING(body) => body.ser(version, bytes),
36877            Self::PLAY_TUNE(body) => body.ser(version, bytes),
36878            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36879            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36880            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36881            Self::POWER_STATUS(body) => body.ser(version, bytes),
36882            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36883            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36884            Self::RAW_IMU(body) => body.ser(version, bytes),
36885            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
36886            Self::RAW_RPM(body) => body.ser(version, bytes),
36887            Self::RC_CHANNELS(body) => body.ser(version, bytes),
36888            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36889            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36890            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
36891            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
36892            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
36893            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
36894            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
36895            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
36896            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
36897            Self::SCALED_IMU(body) => body.ser(version, bytes),
36898            Self::SCALED_IMU2(body) => body.ser(version, bytes),
36899            Self::SCALED_IMU3(body) => body.ser(version, bytes),
36900            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
36901            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36902            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36903            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
36904            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36905            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
36906            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36907            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
36908            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36909            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
36910            Self::SET_MODE(body) => body.ser(version, bytes),
36911            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36912            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36913            Self::SIM_STATE(body) => body.ser(version, bytes),
36914            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36915            Self::STATUSTEXT(body) => body.ser(version, bytes),
36916            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36917            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36918            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36919            Self::SYS_STATUS(body) => body.ser(version, bytes),
36920            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36921            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36922            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36923            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36924            Self::TIMESYNC(body) => body.ser(version, bytes),
36925            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36926            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36927            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36928            Self::TUNNEL(body) => body.ser(version, bytes),
36929            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36930            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36931            Self::UAVIONIX_ADSB_GET(body) => body.ser(version, bytes),
36932            Self::UAVIONIX_ADSB_OUT_CFG(body) => body.ser(version, bytes),
36933            Self::UAVIONIX_ADSB_OUT_CFG_FLIGHTID(body) => body.ser(version, bytes),
36934            Self::UAVIONIX_ADSB_OUT_CFG_REGISTRATION(body) => body.ser(version, bytes),
36935            Self::UAVIONIX_ADSB_OUT_CONTROL(body) => body.ser(version, bytes),
36936            Self::UAVIONIX_ADSB_OUT_DYNAMIC(body) => body.ser(version, bytes),
36937            Self::UAVIONIX_ADSB_OUT_STATUS(body) => body.ser(version, bytes),
36938            Self::UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT(body) => body.ser(version, bytes),
36939            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36940            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36941            Self::VFR_HUD(body) => body.ser(version, bytes),
36942            Self::VIBRATION(body) => body.ser(version, bytes),
36943            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36944            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36945            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36946            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36947            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36948            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36949            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36950            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36951            Self::WIND_COV(body) => body.ser(version, bytes),
36952        }
36953    }
36954    fn extra_crc(id: u32) -> u8 {
36955        match id {
36956            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36957            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36958            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36959            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36960            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36961            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36962            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36963            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36964            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36965            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36966            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36967            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36968                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36969            }
36970            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36971            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36972            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36973            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36974            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36975            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36976            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36977            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36978            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36979            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36980            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36981            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36982            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36983            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36984            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36985            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36986            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36987            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36988            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36989            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36990            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36991            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36992            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36993            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36994            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36995            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36996            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36997            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36998            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36999            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
37000            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
37001            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
37002            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
37003            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
37004            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
37005            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
37006            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
37007            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
37008            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
37009            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
37010            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
37011            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
37012            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
37013            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
37014            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
37015            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
37016            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
37017            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
37018            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
37019            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
37020            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
37021            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
37022            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
37023            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
37024            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
37025            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
37026            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
37027            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37028                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
37029            }
37030            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
37031            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
37032            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
37033            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
37034            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37035                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
37036            }
37037            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
37038            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
37039            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
37040            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
37041            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
37042            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
37043            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
37044            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
37045            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
37046            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
37047            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
37048            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
37049            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
37050            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
37051            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
37052            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
37053            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
37054            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
37055            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
37056            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
37057            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
37058            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
37059            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
37060            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
37061            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
37062            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
37063            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
37064            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
37065            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
37066            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37067                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
37068            }
37069            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
37070            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
37071            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
37072            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
37073            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
37074            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
37075            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
37076            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
37077            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
37078            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
37079            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
37080            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
37081            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
37082            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
37083            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
37084            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
37085            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
37086            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
37087            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
37088            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
37089            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
37090            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
37091            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
37092            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
37093            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
37094            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
37095            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
37096            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
37097            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
37098            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
37099            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
37100            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
37101            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
37102            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
37103            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
37104            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
37105            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
37106            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
37107            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
37108            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
37109            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
37110            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
37111            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
37112            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
37113            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
37114            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
37115            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
37116            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
37117            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
37118            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
37119            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
37120            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
37121            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
37122            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
37123            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
37124            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
37125            PING_DATA::ID => PING_DATA::EXTRA_CRC,
37126            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
37127            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
37128            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
37129            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
37130            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
37131            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
37132            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
37133            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
37134            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
37135            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
37136            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
37137            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
37138            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
37139            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
37140            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
37141            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
37142            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
37143            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
37144            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
37145            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
37146            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
37147            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
37148            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
37149            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
37150            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
37151            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
37152            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
37153            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
37154            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
37155            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
37156            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
37157            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
37158            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
37159            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
37160            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
37161                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
37162            }
37163            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
37164            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
37165            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
37166            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
37167            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
37168            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
37169            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
37170            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
37171            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
37172            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
37173            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
37174            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
37175            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
37176            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
37177            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37178                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
37179            }
37180            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37181                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
37182            }
37183            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
37184            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
37185            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
37186            UAVIONIX_ADSB_GET_DATA::ID => UAVIONIX_ADSB_GET_DATA::EXTRA_CRC,
37187            UAVIONIX_ADSB_OUT_CFG_DATA::ID => UAVIONIX_ADSB_OUT_CFG_DATA::EXTRA_CRC,
37188            UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::ID => {
37189                UAVIONIX_ADSB_OUT_CFG_FLIGHTID_DATA::EXTRA_CRC
37190            }
37191            UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::ID => {
37192                UAVIONIX_ADSB_OUT_CFG_REGISTRATION_DATA::EXTRA_CRC
37193            }
37194            UAVIONIX_ADSB_OUT_CONTROL_DATA::ID => UAVIONIX_ADSB_OUT_CONTROL_DATA::EXTRA_CRC,
37195            UAVIONIX_ADSB_OUT_DYNAMIC_DATA::ID => UAVIONIX_ADSB_OUT_DYNAMIC_DATA::EXTRA_CRC,
37196            UAVIONIX_ADSB_OUT_STATUS_DATA::ID => UAVIONIX_ADSB_OUT_STATUS_DATA::EXTRA_CRC,
37197            UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::ID => {
37198                UAVIONIX_ADSB_TRANSCEIVER_HEALTH_REPORT_DATA::EXTRA_CRC
37199            }
37200            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
37201            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
37202            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
37203            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
37204            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
37205            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
37206            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
37207            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
37208            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
37209            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
37210            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
37211            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
37212            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
37213            _ => 0,
37214        }
37215    }
37216    fn target_system_id(&self) -> Option<u8> {
37217        match self {
37218            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
37219            Self::CANFD_FRAME(inner) => Some(inner.target_system),
37220            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
37221            Self::CAN_FRAME(inner) => Some(inner.target_system),
37222            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
37223            Self::COMMAND_ACK(inner) => Some(inner.target_system),
37224            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
37225            Self::COMMAND_INT(inner) => Some(inner.target_system),
37226            Self::COMMAND_LONG(inner) => Some(inner.target_system),
37227            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
37228            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
37229            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
37230            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
37231            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
37232            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
37233            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
37234            Self::LOGGING_ACK(inner) => Some(inner.target_system),
37235            Self::LOGGING_DATA(inner) => Some(inner.target_system),
37236            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
37237            Self::LOG_ERASE(inner) => Some(inner.target_system),
37238            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
37239            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
37240            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
37241            Self::MISSION_ACK(inner) => Some(inner.target_system),
37242            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
37243            Self::MISSION_COUNT(inner) => Some(inner.target_system),
37244            Self::MISSION_ITEM(inner) => Some(inner.target_system),
37245            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
37246            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
37247            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
37248            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
37249            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
37250            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
37251            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
37252            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
37253            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
37254            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
37255            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
37256            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
37257            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
37258            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
37259            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
37260            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
37261            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
37262            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
37263            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
37264            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
37265            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
37266            Self::PARAM_SET(inner) => Some(inner.target_system),
37267            Self::PING(inner) => Some(inner.target_system),
37268            Self::PLAY_TUNE(inner) => Some(inner.target_system),
37269            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
37270            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
37271            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
37272            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
37273            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
37274            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
37275            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
37276            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
37277            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
37278            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
37279            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
37280            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
37281            Self::SET_MODE(inner) => Some(inner.target_system),
37282            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
37283            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
37284            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
37285            Self::TIMESYNC(inner) => Some(inner.target_system),
37286            Self::TUNNEL(inner) => Some(inner.target_system),
37287            Self::V2_EXTENSION(inner) => Some(inner.target_system),
37288            _ => None,
37289        }
37290    }
37291    fn target_component_id(&self) -> Option<u8> {
37292        match self {
37293            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
37294            Self::CANFD_FRAME(inner) => Some(inner.target_component),
37295            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
37296            Self::CAN_FRAME(inner) => Some(inner.target_component),
37297            Self::COMMAND_ACK(inner) => Some(inner.target_component),
37298            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
37299            Self::COMMAND_INT(inner) => Some(inner.target_component),
37300            Self::COMMAND_LONG(inner) => Some(inner.target_component),
37301            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
37302            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
37303            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
37304            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
37305            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
37306            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
37307            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
37308            Self::LOGGING_ACK(inner) => Some(inner.target_component),
37309            Self::LOGGING_DATA(inner) => Some(inner.target_component),
37310            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
37311            Self::LOG_ERASE(inner) => Some(inner.target_component),
37312            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
37313            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
37314            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
37315            Self::MISSION_ACK(inner) => Some(inner.target_component),
37316            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
37317            Self::MISSION_COUNT(inner) => Some(inner.target_component),
37318            Self::MISSION_ITEM(inner) => Some(inner.target_component),
37319            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
37320            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
37321            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
37322            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
37323            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
37324            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
37325            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
37326            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
37327            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
37328            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
37329            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
37330            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
37331            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
37332            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
37333            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
37334            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
37335            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
37336            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
37337            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
37338            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
37339            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
37340            Self::PARAM_SET(inner) => Some(inner.target_component),
37341            Self::PING(inner) => Some(inner.target_component),
37342            Self::PLAY_TUNE(inner) => Some(inner.target_component),
37343            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
37344            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
37345            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
37346            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
37347            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
37348            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
37349            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
37350            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
37351            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
37352            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
37353            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
37354            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
37355            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
37356            Self::TIMESYNC(inner) => Some(inner.target_component),
37357            Self::TUNNEL(inner) => Some(inner.target_component),
37358            Self::V2_EXTENSION(inner) => Some(inner.target_component),
37359            _ => None,
37360        }
37361    }
37362}